84% getpaid-item-inventory

Code Review | GetPaid > Item Inventory

WordPress plugin GetPaid > Item Inventory scored84%from 54 tests.

About plugin

  • Plugin page: getpaid-item-inve...
  • Plugin version: 1.0.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.2
  • WordPress version: 6.3.1
  • First release: Mar 4, 2022
  • Latest release: Jun 19, 2023
  • Number of updates: 5
  • Update frequency: every 94.8 days
  • Top authors: stiofansisland (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /2,914 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.42MB] [CPU: ▼2.95ms] Passed 4 tests

A check of server-side resources used by GetPaid > Item Inventory
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.90 ▲0.4440.50 ▲0.24
Dashboard /wp-admin3.76 ▲0.4551.01 ▲0.43
Posts /wp-admin/edit.php3.81 ▲0.4550.85 ▲1.08
Add New Post /wp-admin/post-new.php6.28 ▲0.3984.61 ▼13.11
Media Library /wp-admin/upload.php3.62 ▲0.3937.78 ▲0.63
Install Plugins /wp-admin/plugins.php?page=getpaid-item-inventory-install-plugins3.7833.95

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

GetPaid > Item Inventory: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲8014.40 ▲0.111.94 ▲0.4936.77 ▼9.13
Dashboard /wp-admin2,225 ▲455.68 ▲0.0684.23 ▼1.8039.57 ▼4.68
Posts /wp-admin/edit.php2,136 ▲392.18 ▲0.1536.62 ▲1.6138.15 ▲0.20
Add New Post /wp-admin/post-new.php1,548 ▲2023.59 ▲0.49661.58 ▼25.1852.85 ▼6.21
Media Library /wp-admin/upload.php1,435 ▲354.31 ▲0.15102.78 ▼12.1549.02 ▲2.90
Install Plugins /wp-admin/plugins.php?page=getpaid-item-inventory-install-plugins9742.0625.1128.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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, 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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/getpaid-item-inventory/includes/class-tgm-plugin-activation.php:2109

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

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
5 plugin tags: checkout, stock, shop, inventory, selling

getpaid-item-inventory/plugin.php 85% from 13 tests

The primary PHP file in "GetPaid > Item Inventory" version 1.0.6 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Requires at least: Required version must match the one declared in readme.txt ("5.0" instead of "4.9")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("getpaid-item-inventory.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
Good job! No executable or dangerous file extensions detected2,988 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP87982,1632,592
PO File1136146394
Markdown1002

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity33.54
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity3.64
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods160
▷ Static methods74.38%
▷ Public methods13383.12%
▷ Protected methods2415.00%
▷ Private methods31.88%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants240.00%
▷ Class constants360.00%
▷ Public constants3100.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