84% moderateit

Code Review | Free Net of Moderators

WordPress plugin Free Net of Moderators scored84%from 54 tests.

About plugin

  • Plugin page: moderateit
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.3.2
  • WordPress version: 6.3.1
  • First release: Mar 20, 2020
  • Latest release: Mar 23, 2020
  • Number of updates: 11
  • Update frequency: every 2.8 days
  • Top authors: moderateit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /469 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.65MB] [CPU: ▼17.38ms] Passed 4 tests

A check of server-side resources used by Free Net of Moderators
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.75 ▲4.02
Dashboard /wp-admin3.33 ▲0.0347.50 ▼3.59
Posts /wp-admin/edit.php3.45 ▲0.0948.70 ▼2.95
Add New Post /wp-admin/post-new.php3.21 ▼2.6736.85 ▼62.99
Media Library /wp-admin/upload.php3.26 ▲0.0336.05 ▲0.03
Network of Moderators /wp-admin/options-general.php?page=mit-settings-page3.2234.35

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
mit_settings
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Free Net of Moderators
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,944 ▲19813.75 ▼0.5416.52 ▲14.4248.00 ▼1.04
Dashboard /wp-admin2,210 ▲224.85 ▼0.97109.88 ▲5.1138.84 ▼1.87
Posts /wp-admin/edit.php2,096 ▲41.99 ▲0.0339.97 ▲0.1836.51 ▼0.12
Add New Post /wp-admin/post-new.php1,536 ▲223.04 ▼0.25643.74 ▼31.6457.31 ▼0.91
Media Library /wp-admin/upload.php1,389 ▲14.31 ▲0.1199.68 ▼12.4443.04 ▼6.27
Network of Moderators /wp-admin/options-general.php?page=mit-settings-page9002.0524.8327.66

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/moderateit/moderateIt.php:56

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
10 plugin tags: offtop, moderator, discussion, spam, antispam...

moderateit/moderateIt.php 85% from 13 tests

The entry point to "Free Net of Moderators" version 1.0.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("moderateit.php" instead of "moderateIt.php")

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
No dangerous file extensions were detected1,015 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP112173586
JavaScript24839342
PO File1243086
CSS1061

PHP code Passed 2 tests

A brief analysis 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.29
Average class complexity81.00
▷ Minimum class complexity81.00
▷ Maximum class complexity81.00
Average method complexity3.09
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods37
▷ Static methods00.00%
▷ Public methods37100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.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