84% crowd-control

Code Review | Crowd Control by Postmatic - Comment moderation decentralized

WordPress plugin Crowd Control by Postmatic - Comment moderation decentralized scored84%from 54 tests.

About plugin

  • Plugin page: crowd-control
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2
  • WordPress version: 6.3.1
  • First release: Sep 23, 2015
  • Latest release: May 18, 2019
  • Number of updates: 18
  • Update frequency: every 75.9 days
  • Top authors: vernal (66.67%)deployer (27.78%)ronalfy (16.67%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /3,116 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.01MB] [CPU: ▼10.67ms] Passed 4 tests

This is a short check of server-side resources used by Crowd Control by Postmatic - Comment moderation decentralized
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0343.60 ▲0.98
Dashboard /wp-admin3.32 ▼0.0350.61 ▼17.45
Posts /wp-admin/edit.php3.43 ▲0.0849.52 ▼0.64
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.52 ▼25.57
Media Library /wp-admin/upload.php3.24 ▲0.0141.76 ▲3.34

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Crowd Control by Postmatic - Comment moderation decentralized: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲4413.33 ▼1.034.83 ▲2.6246.33 ▲5.20
Dashboard /wp-admin2,221 ▲155.90 ▲0.04105.75 ▲0.8140.74 ▲0.36
Posts /wp-admin/edit.php2,100 ▼32.03 ▼0.0235.53 ▼6.3635.48 ▼0.24
Add New Post /wp-admin/post-new.php1,526 ▼2317.40 ▼1.07670.13 ▲49.1053.26 ▼5.95
Media Library /wp-admin/upload.php1,397 ▼04.32 ▲0.12107.63 ▲1.3847.45 ▲5.01

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 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/crowd-control/crowd-control.php:900

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
10 plugin tags: moderation, comments, reporting, flag, flagging...

crowd-control/crowd-control.php 92% from 13 tests

The main PHP script in "Crowd Control by Postmatic - Comment moderation decentralized" version 1.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 342 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin450 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP199411393
JavaScript16257

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity64.00
▷ Minimum class complexity64.00
▷ Maximum class complexity64.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods28
▷ Static methods00.00%
▷ Public methods2589.29%
▷ Protected methods13.57%
▷ Private methods27.14%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.92MB with 0.58MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
wp-org-assets/banner-772x250.png156.53KB63.90KB▼ 59.18%
wp-org-assets/icon-256x256.png11.98KB4.63KB▼ 61.32%
wp-org-assets/screenshot-1.png67.67KB18.35KB▼ 72.87%
wp-org-assets/screenshot-3.png155.05KB45.38KB▼ 70.73%
wp-org-assets/icon-128x128.png5.57KB2.81KB▼ 49.62%