84% clickship

Code Review | ClickShip

WordPress plugin ClickShip scored84%from 54 tests.

About plugin

  • Plugin page: clickship
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.0
  • WordPress version: 6.3.1
  • First release: Oct 21, 2022
  • Latest release: Oct 21, 2022
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: clickshipfc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /931 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

Analyzing server-side resources used by ClickShip
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0542.11 ▼3.25
Dashboard /wp-admin3.35 ▲0.0449.63 ▼7.11
Posts /wp-admin/edit.php3.46 ▲0.1054.17 ▲6.55
Add New Post /wp-admin/post-new.php5.93 ▲0.0485.20 ▼15.21
Media Library /wp-admin/upload.php3.27 ▲0.0438.69 ▲2.34

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

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

Browser metrics Passed 4 tests

ClickShip: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.35 ▼0.211.67 ▼0.2043.39 ▲0.58
Dashboard /wp-admin2,199 ▲255.62 ▼0.0692.38 ▲0.1440.81 ▼0.31
Posts /wp-admin/edit.php2,107 ▲72.01 ▲0.0039.84 ▲3.3038.48 ▲2.34
Add New Post /wp-admin/post-new.php1,533 ▲523.33 ▲0.08672.78 ▼30.3654.86 ▲2.38
Media Library /wp-admin/upload.php1,404 ▲104.18 ▼0.1398.10 ▼16.9546.36 ▼1.11

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/clickship/admin/clickship-requirements-error.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/clickship/includes/class-clickship-shipping.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: shipping methods, advanced shipping, woocommerce shipping, shipping, woocommerce...

clickship/clickship.php Passed 13 tests

The main PHP file in "ClickShip" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
56 characters long description:
We provide shipping rates at checkout to your customers.

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
No dangerous file extensions were detected351 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP11115593351

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.38
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods35
▷ Static methods25.71%
▷ Public methods3085.71%
▷ Protected methods00.00%
▷ Private methods514.29%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.59MB with 0.34MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png9.30KB3.94KB▼ 57.62%
assets/screenshot-2.png308.69KB121.07KB▼ 60.78%
assets/screenshot-3.png140.79KB53.25KB▼ 62.18%
assets/icon-256x256.png5.19KB2.70KB▼ 47.93%
assets/screenshot-1.png136.99KB53.83KB▼ 60.71%