84% ims-countdown

Code Review | Ims Countdown

WordPress plugin Ims Countdown scored84%from 54 tests.

About plugin

  • Plugin page: ims-countdown
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.7
  • WordPress version: 6.3.1
  • First release: May 23, 2017
  • Latest release: Apr 9, 2021
  • Number of updates: 18
  • Update frequency: every 78.7 days
  • Top authors: inmicrosolutions (83.33%)acewebx (22.22%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /4,777 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼7.99ms] Passed 4 tests

A check of server-side resources used by Ims Countdown
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1343.72 ▲4.34
Dashboard /wp-admin3.43 ▲0.0848.71 ▼14.96
Posts /wp-admin/edit.php3.54 ▲0.1951.66 ▼3.16
Add New Post /wp-admin/post-new.php6.01 ▲0.1386.48 ▼17.12
Media Library /wp-admin/upload.php3.35 ▲0.1236.40 ▲3.27
Settings /wp-admin/edit.php?post_type=ims_countdown&page=imsc_countdown_settings3.3234.57
All Countdowns /wp-admin/edit.php?post_type=ims_countdown3.3939.62
Add New /wp-admin/post-new.php?post_type=ims_countdown3.4850.61

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 41 new files
Database: no new tables, 7 new options
New WordPress options
imsc_timezone
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Ims Countdown
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,884 ▲12314.49 ▲0.113.61 ▲1.9642.41 ▼2.97
Dashboard /wp-admin2,249 ▲465.79 ▼0.0598.84 ▼11.3140.98 ▼8.39
Posts /wp-admin/edit.php2,131 ▲312.00 ▼0.0336.37 ▼0.8336.40 ▼2.72
Add New Post /wp-admin/post-new.php1,571 ▲4023.07 ▼0.04733.06 ▲78.8457.90 ▲3.87
Media Library /wp-admin/upload.php1,431 ▲314.31 ▲0.1199.67 ▼3.7947.40 ▲5.90
Settings /wp-admin/edit.php?post_type=ims_countdown&page=imsc_countdown_settings1,4082.0326.4727.39
All Countdowns /wp-admin/edit.php?post_type=ims_countdown1,1001.9330.7531.71
Add New /wp-admin/post-new.php?post_type=ims_countdown3,9579.57213.2085.81

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • imsc_timezone
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ims-countdown/shortcode/shortcode.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ims-countdown/admin_settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/ims-countdown/imsCountdown.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ims-countdown/custom_fields.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (24 tag instead of maximum 10)
The official readme.txt might help

ims-countdown/imsCountdown.php 92% from 13 tests

The main file in "Ims Countdown" v. 1.3.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ims-countdown.php" instead of "imsCountdown.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin13,280 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
SVG4008,796
JavaScript54095792,610
CSS8134571,144
PHP513168730

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.30
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods110.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin