84% zendrop-dropshipping-and-fulfillment

Code Review | Zendrop - Global Dropshipping

WordPress plugin Zendrop - Global Dropshipping scored 84% from 54 tests.

About plugin

  • Plugin page: zendrop-dropshipp...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.1.1
  • WordPress version: 6.3.1
  • First release: May 21, 2022
  • Latest release: Mar 3, 2023
  • Number of updates: 65
  • Update frequency: every 4.4 days
  • Top authors: zendrop (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active / 6,719 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Zendrop - Global Dropshipping
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0046.41 ▼4.61
Dashboard /wp-admin3.31 ▲0.0047.06 ▼2.02
Posts /wp-admin/edit.php3.36 ▲0.0047.97 ▲2.62
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.52 ▼9.78
Media Library /wp-admin/upload.php3.23 ▲0.0036.37 ▲1.82

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Zendrop - Global Dropshipping
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.20 ▼1.231.80 ▼0.0845.90 ▲5.19
Dashboard /wp-admin2,200 ▲155.83 ▲0.9699.19 ▼7.7937.31 ▼3.51
Posts /wp-admin/edit.php2,086 ▼02.01 ▲0.0236.21 ▼0.7531.07 ▲0.84
Add New Post /wp-admin/post-new.php1,514 ▼2817.69 ▼0.71596.92 ▼60.5469.75 ▼13.75
Media Library /wp-admin/upload.php1,385 ▼34.14 ▼0.05107.98 ▲0.4847.68 ▲5.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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
Even though everything seems fine, this is not 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
Please take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/zendrop-dropshipping-and-fulfillment/worker.php
    • > /wp-content/plugins/zendrop-dropshipping-and-fulfillment/connectorMain.php

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 93% from 29 tests

readme.txt 94% 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
Please fix the following attributes: The official readme.txt is a good inspiration

zendrop-dropshipping-and-fulfillment/connectorMain.php 92% from 13 tests

"Zendrop - Global Dropshipping" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("zendrop-dropshipping-and-fulfillment.php" instead of "connectorMain.php")

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
There were no executable files found in this plugin2,517 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP95185842,205
CSS1230192
JavaScript1200120

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity17.33
▷ Minimum class complexity1.00
▷ Maximum class complexity124.00
Average method complexity3.77
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes20
▷ Abstract classes15.00%
▷ Concrete classes1995.00%
▷ Final classes00.00%
Methods119
▷ Static methods65.04%
▷ Public methods7260.50%
▷ Protected methods2621.85%
▷ Private methods2117.65%
Functions22
▷ Named functions1359.09%
▷ Anonymous functions940.91%
Constants17
▷ Global constants952.94%
▷ Class constants847.06%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.38MB with 0.23MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/logo.png391.44KB156.62KB▼ 59.99%