84% crudlab-disable-comments

Code Review | CRUDLab Disable Comments

WordPress plugin CRUDLab Disable Comments scored84%from 54 tests.

About plugin

  • Plugin page: crudlab-disable-c...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.7
  • WordPress version: 6.3.1
  • First release: Jan 26, 2016
  • Latest release: Dec 8, 2016
  • Number of updates: 12
  • Update frequency: every 26.5 days
  • Top authors: amirk27 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /8,460 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.05MB] [CPU: ▼6.09ms] Passed 4 tests

Analyzing server-side resources used by CRUDLab Disable Comments
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.96 ▼2.05
Dashboard /wp-admin3.06 ▼0.2425.19 ▼21.97
Posts /wp-admin/edit.php3.36 ▲0.0044.17 ▼1.42
Add New Post /wp-admin/post-new.php5.90 ▲0.0292.76 ▲1.08
Media Library /wp-admin/upload.php3.25 ▲0.0235.91 ▲3.34
All Comments /wp-admin/edit-comments.php3.0223.39

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

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

Browser metrics Passed 4 tests

A check of browser resources used by CRUDLab Disable Comments
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,775 ▲4013.27 ▼1.151.59 ▼0.1146.62 ▼5.91
Dashboard /wp-admin2,192 ▲14.96 ▲0.0897.68 ▼4.3685.21 ▲39.09
Posts /wp-admin/edit.php1,946 ▼1432.06 ▲0.0236.83 ▲2.1433.69 ▼3.11
Add New Post /wp-admin/post-new.php1,508 ▼2522.99 ▼0.17674.26 ▼12.5754.21 ▲2.41
Media Library /wp-admin/upload.php1,374 ▼114.22 ▲0.0198.29 ▼8.2871.88 ▲27.67
All Comments /wp-admin/edit-comments.php280.440.073.39

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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 SRP test was a success

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
    • > GET request to /wp-admin/edit-comments.php
    • > Network (severe)
    wp-admin/edit-comments.php - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: disappear commments, close commments, disable comments, delete comments, remove comments...

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

The principal PHP file in "CRUDLab Disable Comments" v. 1.0.5 is loaded by WordPress automatically on each request
95 characters long description:
CRUDLab Disable Comments allows you to disable comments for any page or post or for whole site.

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 plugin38,737 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
SVG80028,600
CSS40106,212
JSON1002,106
JavaScript5145531,373
PHP25736446

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity50.00
▷ Minimum class complexity39.00
▷ Maximum class complexity61.00
Average method complexity3.88
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods34
▷ Static methods12.94%
▷ Public methods3088.24%
▷ Protected methods00.00%
▷ Private methods411.76%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/ico.png1.36KB1.13KB▼ 17.04%