83% ab-api-call-logger

Code Review | API Request Collector

WordPress plugin API Request Collector scored83%from 54 tests.

About plugin

  • Plugin page: ab-api-call-logger
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1+
  • WordPress version: 6.3.1
  • First release: Apr 30, 2013
  • Latest release: Apr 30, 2013
  • Number of updates: 7
  • Update frequency: N/A
  • Top authors: technosailor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,211 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

Analyzing server-side resources used by API Request Collector
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /19.21 ▲15.703,098,132.74 ▲3,098,090.22
Dashboard /wp-admin3.37 ▼0.0254.25 ▼10.54
Posts /wp-admin/edit.php3.42 ▲0.0152.90 ▼1.26
Add New Post /wp-admin/post-new.php5.95 ▲0.0192.20 ▼16.92
Media Library /wp-admin/upload.php3.29 ▲0.0148.32 ▲8.50

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for API Request Collector
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.35 ▼0.242.08 ▲0.6445.18 ▲1.66
Dashboard /wp-admin2,209 ▲345.63 ▼0.0288.20 ▼13.4439.83 ▼3.21
Posts /wp-admin/edit.php2,114 ▲142.03 ▲0.0235.94 ▼4.2732.82 ▼4.46
Add New Post /wp-admin/post-new.php1,536 ▲623.40 ▲0.23682.47 ▲12.0461.79 ▼4.68
Media Library /wp-admin/upload.php1,414 ▲174.25 ▲0.0797.85 ▼3.3840.75 ▼4.78

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/ab-api-call-logger/ab-api-logger.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected


Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: You should set the name of your plugin on the first line ( === ab-api-call-logger === )
  • Screenshots: Add an image for screenshot #1 (This screenshot (properly obfuscated to protect the innocent) shows a clickable list of API calls performed.)
  • Tested up to: Version format is invalid
You can take inspiration from this readme.txt

ab-api-call-logger/ab-api-logger.php 92% from 13 tests

"API Request Collector" version 0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("ab-api-call-logger.php" instead of "ab-api-logger.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
There were no executable files found in this plugin70 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png25.08KB11.37KB▼ 54.65%