74% pmc-disable-comments

Code Review | PMC Disable Comments

WordPress plugin PMC Disable Comments scored74%from 54 tests.

About plugin

  • Plugin page: pmc-disable-comments
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.6
  • WordPress version: 6.3.1
  • First release: Mar 26, 2013
  • Latest release: Apr 29, 2013
  • Number of updates: 8
  • Update frequency: every 94.2 days
  • Top authors: vickybiswas (87.5%)pmcdotcom (25%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /13,838 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.92MB] [CPU: ▼35.35ms] Passed 4 tests

This is a short check of server-side resources used by PMC Disable Comments
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0048.21 ▲0.84
Dashboard /wp-admin3.02 ▼0.2823.91 ▼26.33
Posts /wp-admin/edit.php3.03 ▼0.3323.30 ▼29.44
Add New Post /wp-admin/post-new.php3.02 ▼2.8627.53 ▼70.45
Media Library /wp-admin/upload.php3.02 ▼0.2020.25 ▼15.17

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for PMC Disable Comments
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.011.50 ▼0.2944.05 ▼2.09
Dashboard /wp-admin2,192 ▲155.54 ▼0.0683.60 ▼9.8140.89 ▼1.09
Posts /wp-admin/edit.php2,100 ▼02.04 ▲0.0941.33 ▲1.7136.63 ▼0.66
Add New Post /wp-admin/post-new.php1,526 ▼023.31 ▲0.05664.26 ▲9.9849.98 ▼18.39
Media Library /wp-admin/upload.php1,403 ▲34.19 ▲0.0499.07 ▲0.3148.66 ▲4.24

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • This plugin cannot be uninstalled
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method PMC_Disable_Comments::admin() should not be called statically
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pmc-disable-comments/pmc-disable-comments.php:58

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Please fix this invalid url: ""
  • Screenshots: Add an image for screenshot #1 (2.)
The official readme.txt might help

pmc-disable-comments/pmc-disable-comments.php Passed 13 tests

The primary PHP file in "PMC Disable Comments" version 1.0.1 is used by WordPress to initiate all plugin functionality
85 characters long description:
PMC Disable allows you to switch default commenting on/off for individual post types.

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
There were no executable files found in this plugin50 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP111047
Markdown1103

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes1100.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected