84% gp-disable-api

Code Review | GP Disable API

WordPress plugin GP Disable API scored84%from 54 tests.

About plugin

  • Plugin page: gp-disable-api
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2
  • WordPress version: 6.3.1
  • First release: Nov 22, 2016
  • Latest release: Apr 17, 2023
  • Number of updates: 15
  • Update frequency: every 155.6 days
  • Top authors: GregRoss (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /732 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼11.09ms] Passed 4 tests

A check of server-side resources used by GP Disable API
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.21 ▼0.96
Dashboard /wp-admin3.31 ▼0.0349.26 ▼18.71
Posts /wp-admin/edit.php3.36 ▲0.0153.30 ▼3.78
Add New Post /wp-admin/post-new.php5.89 ▲0.0193.09 ▼20.91
Media Library /wp-admin/upload.php3.23 ▲0.0140.90 ▲4.91

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

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

Browser metrics Passed 4 tests

A check of browser resources used by GP Disable API
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.54 ▼0.192.00 ▲0.3344.35 ▲2.45
Dashboard /wp-admin2,192 ▲155.62 ▲0.0188.94 ▼3.9542.72 ▲1.05
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0838.16 ▼3.1638.01 ▲2.24
Add New Post /wp-admin/post-new.php1,526 ▼923.33 ▲5.21692.44 ▲52.0554.28 ▼20.70
Media Library /wp-admin/upload.php1,397 ▼34.11 ▼0.08132.59 ▲26.6254.49 ▲8.88

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gp-disable-api/gp-disable-api.php:38

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: translation, glotpress

gp-disable-api/gp-disable-api.php Passed 13 tests

The principal PHP file in "GP Disable API" v. 0.5 is loaded by WordPress automatically on each request
44 characters long description:
A GlotPress plugin that disables the GP API.

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
Everything looks great! No dangerous files found in this plugin22 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1111222

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.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
No PNG images were found in this plugin