90% updates-api-inspector

Code Review | Updates API Inspector

WordPress plugin Updates API Inspector scored90%from 54 tests.

About plugin

  • Plugin page: updates-api-inspe...
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.5.0
  • WordPress version: 6.3.1
  • First release: Aug 6, 2020
  • Latest release: Aug 6, 2020
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: pbiron (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,281 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

An overview of server-side resources used by Updates API Inspector
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.51 ▼0.01
Dashboard /wp-admin3.31 ▲0.0144.48 ▼3.33
Posts /wp-admin/edit.php3.36 ▲0.0144.06 ▼0.60
Add New Post /wp-admin/post-new.php5.89 ▲0.0179.16 ▼8.17
Media Library /wp-admin/upload.php3.24 ▲0.0133.65 ▲0.80
Updates API Inspector /wp-admin/tools.php?page=updates-api-inspector3.2136.02

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Updates API Inspector
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.21 ▼1.151.60 ▼0.2139.49 ▼4.00
Dashboard /wp-admin2,210 ▲194.81 ▼0.12108.11 ▲5.2940.75 ▼3.50
Posts /wp-admin/edit.php2,093 ▲42.02 ▼0.0234.65 ▼3.1233.24 ▼0.28
Add New Post /wp-admin/post-new.php1,537 ▼1223.42 ▲4.95617.15 ▲11.1555.25 ▲2.03
Media Library /wp-admin/upload.php1,392 ▲14.21 ▼0.0193.36 ▼9.6043.25 ▼2.53
Updates API Inspector /wp-admin/tools.php?page=updates-api-inspector8252.0329.2527.08

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
1 plugin tags: updates-api

updates-api-inspector/plugin.php 92% from 13 tests

This is the main PHP file of "Updates API Inspector" version 0.1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("updates-api-inspector.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin910 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP191311910

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity58.00
▷ Minimum class complexity58.00
▷ Maximum class complexity58.00
Average method complexity5.82
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods18.33%
▷ Public methods975.00%
▷ Protected methods325.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin