84% o3-cli-services

Code Review | O3 CLI Services

WordPress plugin O3 CLI Services scored84%from 54 tests.

About plugin

  • Plugin page: o3-cli-services
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3.1
  • WordPress version: 6.3.1
  • First release: Dec 18, 2019
  • Latest release: Dec 18, 2019
  • Number of updates: 8
  • Update frequency: every 0.1 days
  • Top authors: o3world (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /454 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.67MB] [CPU: ▼21.16ms] Passed 4 tests

An overview of server-side resources used by O3 CLI Services
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.94 ▼1.95
Dashboard /wp-admin3.32 ▼0.0246.55 ▼11.36
Posts /wp-admin/edit.php3.37 ▲0.0247.16 ▼1.88
Add New Post /wp-admin/post-new.php3.19 ▼2.6935.96 ▼69.46
Media Library /wp-admin/upload.php3.25 ▲0.0233.82 ▼0.56

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for O3 CLI Services
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.30 ▼1.111.73 ▼0.0343.72 ▼0.88
Dashboard /wp-admin2,206 ▲184.87 ▼0.06108.40 ▲0.0840.45 ▼4.27
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0139.75 ▼4.4633.91 ▼2.61
Add New Post /wp-admin/post-new.php1,533 ▲522.99 ▲4.36685.59 ▲35.0259.65 ▲6.63
Media Library /wp-admin/upload.php1,382 ▼64.23 ▼0.0194.16 ▼3.1543.14 ▲0.11

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Interface 'O3CliServices\\Url_List_Plan_Interface' not found in wp-content/plugins/o3-cli-services/src/model/class-abstract-url-list-plan.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/o3-cli-services/src/controller/class-url-sources-controller.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/o3-cli-services/o3-cli-services.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/o3-cli-services/src/controller/class-url-list-controller.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'O3CliServices\\Model\\Abstract_Url_List_Plan' not found in wp-content/plugins/o3-cli-services/src/model/class-o3-url-list-plan.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: rest api, o3 cli, testing, automation, quality assurance...

o3-cli-services/o3-cli-services.php Passed 13 tests

The main PHP script in "O3 CLI Services" version 1.0.2 is automatically included on every request by WordPress
70 characters long description:
Exposes APIs that assist the use of the O3 CLI with WordPress projects

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin376 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP880319376

PHP code Passed 2 tests

This is a very shot 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.35
Average class complexity7.57
▷ Minimum class complexity1.00
▷ Maximum class complexity20.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces4
Interfaces1
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods33
▷ Static methods00.00%
▷ Public methods2163.64%
▷ Protected methods1236.36%
▷ Private methods00.00%
Functions6
▷ Named functions233.33%
▷ Anonymous functions466.67%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
There were not PNG files found in your plugin