78% content-control

Code Review | Content Control - The Ultimate Content Restriction Plugin! Restrict Content, Create Conditional Blocks & More

WordPress plugin Content Control - The Ultimate Content Restriction Plugin! Restrict Content, Create Conditional Blocks & More scored78%from 54 tests.

About plugin

  • Plugin page: content-control
  • Plugin version: 2.0.12
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4
  • WordPress version: 6.3.1
  • First release: Sep 30, 2016
  • Latest release: Oct 26, 2023
  • Number of updates: 95
  • Update frequency: every 27.2 days
  • Top authors: danieliser (52.63%)codeatlantic (36.84%)jungleplugins (7.37%)fpcorso (6.32%)

Code review

54 tests

User reviews

486 reviews

Install metrics

40,000+ active /417,377 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
Installer ran successfully

Server metrics [RAM: ▲2.27MB] [CPU: ▲17.07ms] Passed 4 tests

This is a short check of server-side resources used by Content Control - The Ultimate Content Restriction Plugin! Restrict Content, Create Conditional Blocks & More
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /5.71 ▲2.2556.88 ▲18.14
Dashboard /wp-admin5.59 ▲2.2863.08 ▲16.84
Posts /wp-admin/edit.php5.61 ▲2.2559.03 ▲14.84
Add New Post /wp-admin/post-new.php8.40 ▲2.52102.66 ▲18.47
Media Library /wp-admin/upload.php5.54 ▲2.3158.58 ▲22.87
Content Control /wp-admin/options-general.php?page=content-control-settings5.4646.94

Server storage [IO: ▲1.18MB] [DB: ▲0.02MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 179 new files
Database: no new tables, 13 new options
New WordPress options
widget_recent-comments
content_control_installed_on
content_control_settings
db_upgraded
content_control_debug_log_token
theysaidso_admin_options
content_control_completed_upgrades
widget_theysaidso_widget
content_control_known_blockTypes
can_compress_scripts
...

Browser metrics Passed 4 tests

An overview of browser requirements for Content Control - The Ultimate Content Restriction Plugin! Restrict Content, Create Conditional Blocks & More
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲3714.42 ▲0.071.84 ▲0.2443.59 ▲2.16
Dashboard /wp-admin2,199 ▲215.64 ▲0.0688.14 ▼11.0636.76 ▼1.02
Posts /wp-admin/edit.php2,104 ▲41.98 ▼0.0133.32 ▼2.0334.75 ▼2.83
Add New Post /wp-admin/post-new.php1,556 ▲1923.84 ▲5.52724.70 ▲65.9837.63 ▼26.92
Media Library /wp-admin/upload.php1,404 ▲44.22 ▲0.10104.00 ▲8.3244.86 ▼4.01
Content Control /wp-admin/options-general.php?page=content-control-settings1,78012.09294.0535.48

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 13 options in the database
    • content_control_installed_on
    • content_control_known_blockTypes
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • content_control_completed_upgrades
    • content_control_data_versioning
    • content_control_settings
    • can_compress_scripts
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 28× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'ContentControl\\Vendor\\Psr\\Container\otFoundExceptionInterface' not found in wp-content/plugins/content-control/vendor-prefixed/pimple/pimple/src/Pimple/Exception/InvalidServiceIdentifierException.php:39
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/content-control/vendor-prefixed/pimple/pimple/src/Pimple/Tests/PimpleTest.php:38
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-upgrader-skin.php): failed to open stream: No such file or directory in wp-content/plugins/content-control/classes/Installers/PluginSilentUpgraderSkin.php on line 13
    • > PHP Fatal error
      Uncaught Error: Class 'ContentControl\\Base\\Controller' not found in wp-content/plugins/content-control/classes/Controllers/Compatibility/Elementor.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'ContentControl\\Models\\RuleEngine\\Item' not found in wp-content/plugins/content-control/classes/Models/RuleEngine/Group.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'ContentControl\\Base\\Controller' not found in wp-content/plugins/content-control/classes/Controllers/Admin/WidgetEditor.php:21
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/content-control/classes/Installers/PluginSilentUpgraderSkin.php on line 13
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/content-control/vendor-prefixed/pimple/pimple/src/Pimple/Tests/PimpleServiceProviderInterfaceTest.php:38
    • > PHP Fatal error
      Uncaught Error: Class 'ContentControl\\Base\\Controller' not found in wp-content/plugins/content-control/classes/Controllers/Compatibility/Divi.php:16
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-upgrader-skin.php' (include_path='.:/usr/share/php') in wp-content/plugins/content-control/classes/Installers/PluginSilentUpgraderSkin.php on line 13

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=content-control-settings
    • > Console-api (warning) in wp-includes/js/dist/deprecated.min.js?ver=73ad3591e7bc95f4777a+1:627
    `select` control in `@wordpress/data-controls` is deprecated since version 5.7. Please use built-in `resolveSelect` control in `@wordpress/data` instead.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 17 tag instead of maximum 10
The official readme.txt might help

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

The principal PHP file in "Content Control - The Ultimate Content Restriction Plugin! Restrict Content, Create Conditional Blocks & More" v. 2.0.12 is loaded by WordPress automatically on each request
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 147 characters long)

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
Success! There were no dangerous files found in this plugin14,033 lines of code in 174 files:
LanguageFilesBlank linesComment linesLines of code
PHP1423,8858,69812,804
Sass61082550
JSON100322
JavaScript115248184
SVG600144
CSS80029

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity13.46
▷ Minimum class complexity1.00
▷ Maximum class complexity71.00
Average method complexity3.05
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces31
Interfaces6
Traits0
Classes102
▷ Abstract classes43.92%
▷ Concrete classes9896.08%
▷ Final classes1414.29%
Methods702
▷ Static methods375.27%
▷ Public methods62589.03%
▷ Protected methods162.28%
▷ Private methods618.69%
Functions186
▷ Named functions9350.00%
▷ Anonymous functions9350.00%
Constants56
▷ Global constants00.00%
▷ Class constants56100.00%
▷ Public constants56100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/rule-engine-first-time.png12.47KB5.84KB▼ 53.14%
assets/images/icon-128x128.png15.63KB5.92KB▼ 62.12%