10% censorship

Code Review | Censorship Plugin

WordPress plugin Censorship Plugin scored10%from 54 tests.

About plugin

  • Plugin page: censorship
  • Plugin version: 3.00
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.5
  • WordPress version: 6.3.1
  • First release: Oct 9, 2017
  • Latest release: Aug 23, 2020
  • Number of updates: 17
  • Update frequency: every 61.8 days
  • Top authors: nath4n (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,217 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/censorship/init.php+15
    Constant WP_DEBUG already defined

Server metrics [RAM: ▼1.96MB] [CPU: ▼55.85ms] Passed 4 tests

A check of server-side resources used by Censorship Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.41 ▼40.65
Dashboard /wp-admin2.05 ▼1.266.03 ▼51.18
Posts /wp-admin/edit.php2.05 ▼1.316.71 ▼42.85
Add New Post /wp-admin/post-new.php2.05 ▼3.847.24 ▼88.70
Media Library /wp-admin/upload.php2.05 ▼1.185.25 ▼30.92

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
censorship-settings
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Censorship Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,895 ▲13414.80 ▲0.581.67 ▼0.4744.86 ▼0.52
Dashboard /wp-admin2,304 ▲1275.20 ▼0.4289.73 ▼7.0841.19 ▼0.92
Posts /wp-admin/edit.php2,206 ▲1092.33 ▲0.3134.41 ▼1.3033.76 ▼1.08
Add New Post /wp-admin/post-new.php1,558 ▲3023.17 ▲0.02656.54 ▼28.9836.04 ▼24.81
Media Library /wp-admin/upload.php1,507 ▲1104.54 ▲0.3199.04 ▼12.8743.52 ▼5.31

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/censorship/init.php+15
    Constant WP_DEBUG already defined
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • censorship-settings
    • theysaidso_admin_options
    • can_compress_scripts

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
The smoke test was a success, however most plugin functionality was not tested

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 server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/censorship/init.php:42

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 86% from 29 tests

readme.txt 94% 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:
  • Screenshots: Screenshot #3 (The cencored comments (Replace badword with *****)) image required
Please take inspiration from this readme.txt

censorship/init.php 77% from 13 tests

The main file in "Censorship Plugin" v. 3.00 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("censorship.php" instead of "init.php")
  • Domain Path: The domain path folder was not found ("/languages")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin353 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP14119350
JavaScript2142
CSS1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
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%
Functions8
▷ Named functions562.50%
▷ Anonymous functions337.50%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin