93% 2kb-amazon-dropship-manager

Code Review | 2kb Amazon DropShip Manager

WordPress plugin 2kb Amazon DropShip Manager scored 93% from 54 tests.

About plugin

  • Plugin page: 2kb-amazon-dropsh...
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.1
  • WordPress version: 5.9.2
  • First release: Mar 14, 2015
  • Latest release: Aug 3, 2018
  • Number of updates: 8
  • Update frequency: every 154.9 days
  • Top authors: 2kblater.com (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,161 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼302.25ms] Passed 4 tests

A check of server-side resources used by 2kb Amazon DropShip Manager
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0555.84 ▲2.34
Dashboard /wp-admin3.45 ▲0.0433.00 ▼23.94
Posts /wp-admin/edit.php3.68 ▲0.0442.31 ▼0.64
Add New Post /wp-admin/post-new.php6.92 ▼0.0599.90 ▼1,179.14
Media Library /wp-admin/upload.php3.33 ▲0.0426.98 ▼5.27

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 19 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for 2kb Amazon DropShip Manager
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,797 ▲4315.62 ▲0.015.83 ▼0.532.91 ▲0.34
Dashboard /wp-admin2,890 ▲326.10 ▼0.09119.53 ▼18.07182.56 ▲9.95
Posts /wp-admin/edit.php2,705 ▲353.23 ▼0.0163.21 ▼30.71140.79 ▼7.87
Add New Post /wp-admin/post-new.php1,679 ▼1118.52 ▼2.69400.77 ▼36.47183.82 ▲21.51
Media Library /wp-admin/upload.php1,714 ▲165.48 ▼0.09152.24 ▲11.60230.40 ▲40.02

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstaller ran successfully

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)
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/2kb-amazon-dropship-manager/KbAmazonDropShipManagerAdmin.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'KbAmzAdminController' not found in wp-content/plugins/2kb-amazon-dropship-manager/KbAmazonDropShipManagerController.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Contributors: Plugin contributors field is missing
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === 2kb-amazon-dropship-manager === )
The official readme.txt might help

2kb-amazon-dropship-manager/plugin.php 85% from 13 tests

The principal PHP file in "2kb Amazon DropShip Manager" v. 1.1.2 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("2kb-amazon-dropship-manager.php" instead of "plugin.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 200 characters long)

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 plugin1,445 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP15191481,445

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods1487.50%
▷ Protected methods212.50%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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.13MB with 0.08MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
template/img/2kb-amazon-drop-ship-manager-logo.png134.53KB53.50KB▼ 60.23%