84% conditional-comments-message

Code Review | Conditional Comments Message

WordPress plugin Conditional Comments Message scored84%from 54 tests.

About plugin

  • Plugin page: conditional-comme...
  • Plugin version: 0.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.1
  • WordPress version: 6.3.1
  • First release: May 19, 2014
  • Latest release: Jan 17, 2015
  • Number of updates: 11
  • Update frequency: every 22.2 days
  • Top authors: jp2112 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /917 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Conditional Comments Message
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0943.61 ▼0.81
Dashboard /wp-admin3.39 ▲0.0851.87 ▼5.96
Posts /wp-admin/edit.php3.51 ▲0.1451.95 ▼4.36
Add New Post /wp-admin/post-new.php5.97 ▲0.0888.40 ▼20.84
Media Library /wp-admin/upload.php3.32 ▲0.0841.01 ▲3.34
Conditional Comments Message /wp-admin/options-general.php?page=conditional-comments-message3.2835.15

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
ccm
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Conditional Comments Message
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.30 ▼0.071.86 ▼0.0544.95 ▼3.33
Dashboard /wp-admin2,199 ▲225.55 ▼0.1480.58 ▼10.7440.48 ▼7.81
Posts /wp-admin/edit.php2,104 ▲12.03 ▼0.0336.31 ▼4.1035.56 ▼1.65
Add New Post /wp-admin/post-new.php1,548 ▼623.16 ▲4.64662.40 ▲21.9160.15 ▲10.33
Media Library /wp-admin/upload.php1,404 ▲14.16 ▼0.0597.72 ▼2.1144.59 ▲1.40
Conditional Comments Message /wp-admin/options-general.php?page=conditional-comments-message9242.0123.5444.84

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/conditional-comments-message/conditional-comments-message.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: comments, after, conditional, message, automatically close

conditional-comments-message/conditional-comments-message.php Passed 13 tests

The principal PHP file in "Conditional Comments Message" v. 0.0.9 is loaded by WordPress automatically on each request
59 characters long description:
Show a message when comments are set to close automatically

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin272 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP31638267
CSS1005

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions27
▷ Named functions27100.00%
▷ Anonymous functions00.00%
Constants16
▷ Global constants16100.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
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/comment_message.png5.37KB2.65KB▼ 50.62%
images/settings.png2.11KB2.31KB0.00%
images/support.png5.03KB2.79KB▼ 44.54%