84% thecartpress-australian-states

Code Review | Australian States for TheCartPress

WordPress plugin Australian States for TheCartPress scored84%from 54 tests.

About plugin

  • Plugin page: thecartpress-aust...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.2
  • WordPress version: 6.3.1
  • First release: Oct 5, 2011
  • Latest release: Jun 17, 2013
  • Number of updates: 4
  • Update frequency: every 155.5 days
  • Top authors: inigoini (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,755 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼6.16ms] Passed 4 tests

A check of server-side resources used by Australian States for TheCartPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0046.75 ▲4.55
Dashboard /wp-admin3.31 ▼0.0455.07 ▼9.49
Posts /wp-admin/edit.php3.36 ▲0.0048.57 ▲0.25
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.92 ▼12.28
Media Library /wp-admin/upload.php3.23 ▲0.0042.23 ▼3.10

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Australian States for TheCartPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.24 ▼0.041.68 ▼0.5839.88 ▼3.58
Dashboard /wp-admin2,192 ▲145.57 ▼0.10109.36 ▼4.5546.74 ▲1.94
Posts /wp-admin/edit.php2,100 ▼31.95 ▼0.0438.68 ▲2.6737.01 ▲1.08
Add New Post /wp-admin/post-new.php1,526 ▼723.69 ▲0.56657.00 ▼58.0949.77 ▼12.06
Media Library /wp-admin/upload.php1,400 ▲34.14 ▼0.03117.66 ▲5.7044.56 ▼3.27

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • 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)
Even though everything seems fine, this is not 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 fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/thecartpress-australian-states/AustralianStates.class.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% 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
Attributes that require attention:
  • Tags: There are too many tags (15 tag instead of maximum 10)
The official readme.txt is a good inspiration

thecartpress-australian-states/AustralianStates.class.php 92% from 13 tests

Analyzing the main PHP file in "Australian States for TheCartPress" version 1.0.0
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("thecartpress-australian-states.php" instead of "AustralianStates.class.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
Success! There were no dangerous files found in this plugin13 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP152613

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin