77% shipping-rates-cities-woocommerce

Code Review | Shipping Rates Cities Woocommerce

WordPress plugin Shipping Rates Cities Woocommerce scored77%from 54 tests.

About plugin

  • Plugin page: shipping-rates-ci...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-5.2
  • WordPress version: 6.3.1
  • First release: Sep 13, 2019
  • Latest release: Feb 2, 2020
  • Number of updates: 3
  • Update frequency: every 48.0 days
  • Top authors: saulmorales (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /1,894 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 successfully, without throwing any errors or notices

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

Server-side resources used by Shipping Rates Cities Woocommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.49 ▼3.08
Dashboard /wp-admin3.32 ▲0.0247.30 ▼0.90
Posts /wp-admin/edit.php3.37 ▲0.0246.06 ▼3.57
Add New Post /wp-admin/post-new.php5.90 ▲0.0282.04 ▼23.60
Media Library /wp-admin/upload.php3.25 ▲0.0233.60 ▲2.46

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

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

Browser metrics Passed 4 tests

Shipping Rates Cities Woocommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.27 ▼1.024.79 ▲3.0646.90 ▼1.49
Dashboard /wp-admin2,212 ▲245.83 ▲0.9396.67 ▼4.4442.09 ▼2.15
Posts /wp-admin/edit.php2,095 ▲31.97 ▼0.0636.18 ▼1.8435.76 ▲0.65
Add New Post /wp-admin/post-new.php1,539 ▼323.39 ▲5.32672.53 ▲63.6253.55 ▼13.25
Media Library /wp-admin/upload.php1,394 ▲34.26 ▲0.0896.72 ▼2.0343.46 ▼0.85

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
The following issues need your attention
  • 5× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/shipping-rates-cities-woocommerce/lib/vendor/markbaker/matrix/buildPhar.php
    • > /wp-content/plugins/shipping-rates-cities-woocommerce/lib/vendor/markbaker/matrix/examples/test.php
    • > /wp-content/plugins/shipping-rates-cities-woocommerce/lib/vendor/markbaker/complex/examples/testFunctions.php
    • > /wp-content/plugins/shipping-rates-cities-woocommerce/lib/vendor/markbaker/complex/examples/complexTest.php
    • > /wp-content/plugins/shipping-rates-cities-woocommerce/lib/vendor/markbaker/complex/examples/testOperations.php
  • 96× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Worksheet\\Dimension' not found in wp-content/plugins/shipping-rates-cities-woocommerce/lib/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowDimension.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Reader\\BaseReader' not found in wp-content/plugins/shipping-rates-cities-woocommerce/lib/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Gnumeric.php:23
    • > PHP Fatal error
      Uncaught Error: Interface 'PhpOffice\\PhpSpreadsheet\\IComparable' not found in wp-content/plugins/shipping-rates-cities-woocommerce/lib/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Drawing/Shadow.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Style\\Supervisor' not found in wp-content/plugins/shipping-rates-cities-woocommerce/lib/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Style.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'PhpOffice\\PhpSpreadsheet\\Chart\\Renderer\\IRenderer' not found in wp-content/plugins/shipping-rates-cities-woocommerce/lib/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Renderer/JpGraph.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Exception' not found in wp-content/plugins/shipping-rates-cities-woocommerce/lib/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Exception.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Matrix\\Operators\\Multiplication' not found in wp-content/plugins/shipping-rates-cities-woocommerce/lib/vendor/markbaker/matrix/classes/src/Operators/Division.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'PhpOffice\\PhpSpreadsheet\\Reader\\IReadFilter' not found in wp-content/plugins/shipping-rates-cities-woocommerce/lib/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/DefaultReadFilter.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Shared\\Trend\\BestFit' not found in wp-content/plugins/shipping-rates-cities-woocommerce/lib/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/LinearBestFit.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Writer\\BaseWriter' not found in wp-content/plugins/shipping-rates-cities-woocommerce/lib/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
The official readme.txt is a good inspiration

shipping-rates-cities-woocommerce/shipping-rates-cities-woocommerce.php 92% from 13 tests

The main PHP file in "Shipping Rates Cities Woocommerce" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("5.0" instead of "2.6")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin60,803 lines of code in 325 files:
LanguageFilesBlank linesComment linesLines of code
PHP30712,81331,22159,792
JSON400501
Markdown8990348
YAML4171294
JavaScript28068

PHP code 0% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 1,016)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 387)
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity44.10
▷ Minimum class complexity1.00
▷ Maximum class complexity1,016.00
Average method complexity4.45
▷ Minimum method complexity1.00
▷ Maximum method complexity387.00
Code structure
Namespaces44
Interfaces10
Traits0
Classes220
▷ Abstract classes167.27%
▷ Concrete classes20492.73%
▷ Final classes00.00%
Methods2,894
▷ Static methods67423.29%
▷ Public methods2,26078.09%
▷ Protected methods862.97%
▷ Private methods54818.94%
Functions84
▷ Named functions6678.57%
▷ Anonymous functions1821.43%
Constants773
▷ Global constants10.13%
▷ Class constants77299.87%
▷ Public constants772100.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
No PNG images were found in this plugin