84% op-custom-api

Code Review | Op Custom API

WordPress plugin Op Custom API scored84%from 54 tests.

About plugin

  • Plugin page: op-custom-api
  • Plugin version: 5.1.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-4.2
  • WordPress version: 6.3.1
  • First release: Aug 8, 2019
  • Latest release: Aug 8, 2019
  • Number of updates: 15
  • Update frequency: every 0.1 days
  • Top authors: maiuoc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /585 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

Analyzing server-side resources used by Op Custom API
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.75 ▼5.30
Dashboard /wp-admin3.32 ▲0.0248.28 ▼5.03
Posts /wp-admin/edit.php3.37 ▲0.0147.57 ▼5.26
Add New Post /wp-admin/post-new.php5.90 ▲0.0195.90 ▲3.55
Media Library /wp-admin/upload.php3.24 ▲0.0137.74 ▲0.02

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Op Custom API
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲1914.70 ▲0.331.68 ▼0.3646.97 ▲1.41
Dashboard /wp-admin2,208 ▲345.50 ▼0.0298.67 ▼3.7642.29 ▼0.16
Posts /wp-admin/edit.php2,116 ▲341.97 ▼0.0735.72 ▼0.7633.65 ▼1.97
Add New Post /wp-admin/post-new.php1,539 ▲1123.72 ▲0.70677.55 ▼5.0754.44 ▼5.69
Media Library /wp-admin/upload.php1,416 ▲164.33 ▲0.11100.83 ▼3.3946.61 ▼1.94

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-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/op-custom-api/op-custom-api.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 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
4 plugin tags: capabilities, users, roles, members

op-custom-api/op-custom-api.php 92% from 13 tests

Analyzing the main PHP file in "Op Custom API" version 5.1.7
It is important to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin56 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1113456

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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