83% countdown-date-time-and-promoter

Code Review | Countdown, Date, Time and Promoter

WordPress plugin Countdown, Date, Time and Promoter scored83%from 54 tests.

About plugin

  • Plugin page: countdown-date-ti...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Aug 30, 2017
  • Latest release: Aug 30, 2017
  • Number of updates: 14
  • Update frequency: every 0.1 days
  • Top authors: alinursal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /682 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼3.80ms] Passed 4 tests

Analyzing server-side resources used by Countdown, Date, Time and Promoter
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0636.04 ▼5.25
Dashboard /wp-admin3.41 ▲0.1048.80 ▼1.56
Posts /wp-admin/edit.php3.46 ▲0.1050.60 ▲5.00
Add New Post /wp-admin/post-new.php5.99 ▲0.1085.12 ▼11.43
Media Library /wp-admin/upload.php3.33 ▲0.1036.93 ▲3.06

Server storage [IO: ▲0.63MB] [DB: ▲0.00MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Countdown, Date, Time and Promoter
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲8113.56 ▼0.821.70 ▼0.3442.93 ▲0.66
Dashboard /wp-admin2,222 ▲315.87 ▲0.9798.04 ▼3.1639.37 ▼2.63
Posts /wp-admin/edit.php2,105 ▲132.03 ▼0.0139.59 ▼9.0937.21 ▼0.40
Add New Post /wp-admin/post-new.php1,546 ▲3323.16 ▲5.59665.46 ▲68.2259.05 ▲6.11
Media Library /wp-admin/upload.php1,404 ▲134.17 ▼0.1393.47 ▼6.2643.44 ▲1.07

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant CFC_PATH - assumed 'CFC_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/countdown-date-time-and-promoter/app/index.php on line 11
    • > PHP Fatal error
      require(): Failed opening required 'CFC_PATH/css/main.css' (include_path='.:/usr/share/php') in wp-content/plugins/countdown-date-time-and-promoter/app/index.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/countdown-date-time-and-promoter/customized_countdown_date_time_promoter.php:16
    • > PHP Warning
      require(CFC_PATH/css/main.css): failed to open stream: No such file or directory in wp-content/plugins/countdown-date-time-and-promoter/app/index.php on line 11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (Countdown, Date, Time and Promoter plugin printscreens), #2 (Countdown, Date, Time and Promoter plugin settings page)
Please take inspiration from this readme.txt

countdown-date-time-and-promoter/customized_countdown_date_time_promoter.php 85% from 13 tests

The principal PHP file in "Countdown, Date, Time and Promoter" v. 1.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("countdown-date-time-and-promoter.php" instead of "customized_countdown_date_time_promoter.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 226 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected569 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP35327443
JavaScript127768
CSS17058

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected