83% shop1-dropshipping

Code Review | Shop1 Dropshipping

WordPress plugin Shop1 Dropshipping scored83%from 54 tests.

About plugin

  • Plugin page: shop1-dropshipping
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-5.6
  • WordPress version: 6.3.1
  • First release: Dec 9, 2020
  • Latest release: Dec 9, 2020
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: shop1com (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /398 total downloads

Benchmarks

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.10MB] [CPU: ▼7.41ms] Passed 4 tests

An overview of server-side resources used by Shop1 Dropshipping
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.23 ▼8.63
Dashboard /wp-admin3.45 ▲0.1044.99 ▼19.65
Posts /wp-admin/edit.php3.51 ▲0.1647.45 ▲2.21
Add New Post /wp-admin/post-new.php6.01 ▲0.1290.50 ▼3.57
Media Library /wp-admin/upload.php3.45 ▲0.2237.62 ▲2.65

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Shop1 Dropshipping
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6613.24 ▼0.974.50 ▲2.6542.79 ▼1.94
Dashboard /wp-admin2,218 ▲305.79 ▲0.9199.20 ▼19.8639.74 ▼7.71
Posts /wp-admin/edit.php2,101 ▲122.05 ▲0.0240.90 ▲5.5235.51 ▼1.55
Add New Post /wp-admin/post-new.php1,545 ▲823.26 ▲0.10667.33 ▲42.8651.78 ▲3.25
Media Library /wp-admin/upload.php1,394 ▲64.31 ▲0.0799.10 ▲4.9746.55 ▲4.05

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/shop1-dropshipping/templates/admin/page-configuration.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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: You can look at the official readme.txt

shop1-dropshipping/shop1-dropshipping.php 85% from 13 tests

This is the main PHP file of "Shop1 Dropshipping" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("5.3" instead of "4.0.0")
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

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
Everything looks great! No dangerous files found in this plugin791 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP69624735
JavaScript13056

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity24.33
▷ Minimum class complexity2.00
▷ Maximum class complexity66.00
Average method complexity2.81
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods37
▷ Static methods3594.59%
▷ Public methods2259.46%
▷ Protected methods00.00%
▷ Private methods1540.54%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants11
▷ Global constants19.09%
▷ Class constants1090.91%
▷ Public constants10100.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.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/shop1-logo.png13.49KB6.02KB▼ 55.33%