84% content-management-control

Code Review | Content management control

WordPress plugin Content management control scored84%from 54 tests.

About plugin

  • Plugin page: content-managemen...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 25, 2018
  • Latest release: Oct 25, 2018
  • Number of updates: 2
  • Update frequency: every 2.5 days
  • Top authors: slayerh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /503 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.46ms] Passed 4 tests

An overview of server-side resources used by Content management control
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.63 ▲0.77
Dashboard /wp-admin3.31 ▲0.0148.28 ▼7.03
Posts /wp-admin/edit.php3.36 ▲0.0150.48 ▼1.04
Add New Post /wp-admin/post-new.php5.89 ▲0.01101.05 ▲7.95
Media Library /wp-admin/upload.php3.23 ▲0.0133.11 ▼2.55

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Content management control
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.41 ▼0.891.82 ▲0.1643.54 ▲0.11
Dashboard /wp-admin2,206 ▲184.85 ▼0.13105.33 ▼2.1242.05 ▼2.75
Posts /wp-admin/edit.php2,092 ▲32.03 ▲0.0138.68 ▼5.9134.32 ▼1.75
Add New Post /wp-admin/post-new.php6,225 ▲4,68925.87 ▲2.71900.67 ▲293.6554.54 ▲7.62
Media Library /wp-admin/upload.php1,391 ▲34.23 ▲0.0598.22 ▼13.1043.93 ▼5.06

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% 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
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/content-management-control/content-management-control.php

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 Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: lock post, restrict content, capabilities, restrict editing, access control...

content-management-control/content-management-control.php Passed 13 tests

This is the main PHP file of "Content management control" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
61 characters long description:
Allows administrator to lock post from editing by other users

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin59 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1131059

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin