83% controlled-content-block

Code Review | Controlled Content Block

WordPress plugin Controlled Content Block scored83%from 54 tests.

About plugin

  • Plugin page: controlled-conten...
  • Plugin version: 0.2.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.0
  • WordPress version: 6.3.1
  • First release: May 28, 2022
  • Latest release: May 31, 2022
  • Number of updates: 4
  • Update frequency: every 1.5 days
  • Top authors: wpblockbuddy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /868 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.40ms] Passed 4 tests

Analyzing server-side resources used by Controlled Content Block
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0237.64 ▼5.95
Dashboard /wp-admin3.33 ▲0.0247.61 ▼7.13
Posts /wp-admin/edit.php3.38 ▲0.0255.96 ▲7.32
Add New Post /wp-admin/post-new.php5.91 ▲0.0290.30 ▼13.40
Media Library /wp-admin/upload.php3.25 ▲0.0235.95 ▼3.12

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Controlled Content Block
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.37 ▼0.011.87 ▲0.2139.94 ▼1.57
Dashboard /wp-admin2,195 ▲155.56 ▲0.0388.22 ▼5.5138.54 ▼3.82
Posts /wp-admin/edit.php2,100 ▼31.98 ▼0.0636.43 ▼0.7033.18 ▼1.01
Add New Post /wp-admin/post-new.php6,367 ▲4,83927.47 ▲4.38842.92 ▲145.7656.80 ▲2.48
Media Library /wp-admin/upload.php1,400 ▼04.36 ▲0.13102.22 ▼16.2443.74 ▼10.01

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

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 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
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 add_action() in wp-content/plugins/controlled-content-block/controlled-content.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention: The official readme.txt is a good inspiration

controlled-content-block/controlled-content.php 77% from 13 tests

The main PHP script in "Controlled Content Block" version 0.2.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Requires PHP: Required version must be the same as the one declared in readme.txt ("5.6" instead of "7.0")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("controlled-content-block.php" instead of "controlled-content.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin220 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript52027128
JSON10045
PHP251331
Sass11015
CSS1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin