84% ctc-countdown-timer-cookies

Code Review | CTC Countdown Timer Cookies

WordPress plugin CTC Countdown Timer Cookies scored84%from 54 tests.

About plugin

  • Plugin page: ctc-countdown-tim...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.3.2
  • WordPress version: 6.3.1
  • First release: Mar 27, 2020
  • Latest release: Mar 28, 2020
  • Number of updates: 12
  • Update frequency: every 0.2 days
  • Top authors: androjerbi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /590 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.11MB] [CPU: ▼8.06ms] Passed 4 tests

Server-side resources used by CTC Countdown Timer Cookies
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1137.38 ▲0.83
Dashboard /wp-admin3.41 ▲0.1142.58 ▼4.88
Posts /wp-admin/edit.php3.52 ▲0.1752.09 ▲1.71
Add New Post /wp-admin/post-new.php5.99 ▲0.1175.37 ▼27.36
Media Library /wp-admin/upload.php3.33 ▲0.1133.35 ▼0.83
Countdown List /wp-admin/edit.php?post_type=ctc_countdown3.3834.52
Add Countdown /wp-admin/post-new.php?post_type=ctc_countdown3.3841.07

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by CTC Countdown Timer Cookies
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲5914.47 ▲0.051.63 ▼0.3140.25 ▲0.47
Dashboard /wp-admin2,233 ▲454.84 ▼0.04116.24 ▲10.7744.90 ▲1.44
Posts /wp-admin/edit.php2,119 ▲301.99 ▲0.0141.37 ▲1.4834.91 ▼1.00
Add New Post /wp-admin/post-new.php1,556 ▲4223.12 ▲5.67608.93 ▲21.3558.94 ▲11.12
Media Library /wp-admin/upload.php1,412 ▲274.22 ▲0.1099.17 ▼7.3240.78 ▼6.12
Countdown List /wp-admin/edit.php?post_type=ctc_countdown1,0891.9535.4831.07
Add Countdown /wp-admin/post-new.php?post_type=ctc_countdown1,5762.5750.3054.79

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not 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
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/ctc-countdown-timer-cookies/admin/partials/ctc-countdown-timer-cookies-admin-display.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/ctc-countdown-timer-cookies/public/partials/ctc-countdown-timer-cookies-public-display.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add a description for screenshot #3 in ctc-countdown-timer-cookies/assets to your readme.txt
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
Please take inspiration from this readme.txt

ctc-countdown-timer-cookies/ctc-countdown-timer-cookies.php Passed 13 tests

This is the main PHP file of "CTC Countdown Timer Cookies" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
96 characters long description:
This is a short description of what the plugin does. It's displayed in the WordPress admin area.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin536 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP12156608384
JavaScript324465
PO File1161851
CSS3111236

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity5.29
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity1.94
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods32
▷ Static methods26.25%
▷ Public methods2784.38%
▷ Protected methods00.00%
▷ Private methods515.62%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
3 PNG files occupy 0.21MB with 0.15MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png84.11KB24.04KB▼ 71.41%
assets/screenshot-2.png114.77KB31.15KB▼ 72.86%
assets/screenshot-3.png19.03KB6.19KB▼ 67.46%