79% api-log-pro

Code Review | API Log Pro

WordPress plugin API Log Pro scored79%from 54 tests.

About plugin

  • Plugin page: api-log-pro
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.0
  • WordPress version: 6.3.1
  • First release: Sep 23, 2019
  • Latest release: Jun 24, 2022
  • Number of updates: 24
  • Update frequency: every 41.8 days
  • Top authors: bhubbard (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,794 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.11MB] [CPU: ▼4.57ms] Passed 4 tests

Analyzing server-side resources used by API Log Pro
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1241.17 ▲0.50
Dashboard /wp-admin3.42 ▲0.1145.37 ▼5.23
Posts /wp-admin/edit.php3.53 ▲0.1742.85 ▼7.76
Add New Post /wp-admin/post-new.php6.01 ▲0.1288.53 ▼3.72
Media Library /wp-admin/upload.php3.34 ▲0.1132.71 ▼1.56

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 28 new files
Database: 3 new tables, 6 new options
New tables
wp_api_log_pro
wp_api_log_pro_meta
wp_api_log_pro_outgoing
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for API Log Pro
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.62 ▼1.011.67 ▼0.2841.46 ▼6.50
Dashboard /wp-admin2,225 ▲375.85 ▼0.0198.61 ▼15.6542.14 ▼1.91
Posts /wp-admin/edit.php2,105 ▲132.00 ▲0.0336.11 ▼0.9435.76 ▼0.36
Add New Post /wp-admin/post-new.php1,546 ▲1023.43 ▲0.23657.66 ▲33.7146.22 ▼8.86
Media Library /wp-admin/upload.php1,404 ▲194.21 ▲0.01100.18 ▲5.6644.17 ▲2.20

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 does not fully uninstall, leaving 1 table in the database
    • wp_api_log_pro_outgoing
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: api, json api, logging, wp api, rest api...

api-log-pro/class-api-log-pro.php 85% from 13 tests

The primary PHP file in "API Log Pro" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("api-log-pro.php" instead of "class-api-log-pro.php")
  • Domain Path: The domain path is invalid: folder "/languages/" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin1,298 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP14346443747
JavaScript43327361
CSS42415137
YAML10028
Markdown29025

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity6.00
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.56
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods46
▷ Static methods00.00%
▷ Public methods46100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin