83% 2kb-amazon-dropship-manager

Code Review | 2kb Amazon DropShip Manager

WordPress plugin 2kb Amazon DropShip Manager scored83%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: 6.3.1
  • 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,436 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼9.65ms] Passed 4 tests

Server-side resources used by 2kb Amazon DropShip Manager
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.24 ▼1.50
Dashboard /wp-admin3.34 ▲0.0452.38 ▼0.11
Posts /wp-admin/edit.php3.40 ▲0.0448.59 ▼14.07
Add New Post /wp-admin/post-new.php5.93 ▲0.0485.28 ▼22.90
Media Library /wp-admin/upload.php3.27 ▲0.0439.79 ▲2.49

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

2kb Amazon DropShip Manager: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲6313.92 ▼0.472.20 ▲0.2843.75 ▼2.92
Dashboard /wp-admin2,205 ▲255.64 ▼0.0198.72 ▲13.7143.32 ▲1.70
Posts /wp-admin/edit.php2,110 ▲102.02 ▲0.0136.55 ▼6.1935.22 ▼0.96
Add New Post /wp-admin/post-new.php1,538 ▲1023.13 ▼0.09678.77 ▲8.7563.83 ▼2.24
Media Library /wp-admin/upload.php1,413 ▲164.21 ▲0.0496.56 ▼8.4448.32 ▲0.83

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
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

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 take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'KbAmzAdminController' not found in wp-content/plugins/2kb-amazon-dropship-manager/KbAmazonDropShipManagerController.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/2kb-amazon-dropship-manager/KbAmazonDropShipManagerAdmin.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === 2kb-amazon-dropship-manager === )
  • Contributors: Contributors not specified
You can take inspiration from this readme.txt

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

The entry point to "2kb Amazon DropShip Manager" version 1.1.2 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as 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 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected1,445 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP15191481,445

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
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%