89% woo-myaccount-shortcodes

Code Review | WC Myaccount Shortcodes

WordPress plugin WC Myaccount Shortcodes scored89%from 54 tests.

About plugin

  • Plugin page: woo-myaccount-sho...
  • Plugin version: 1.5
  • PHP compatiblity: 7.3.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.9-5.4.1
  • WordPress version: 6.3.1
  • First release: Jun 7, 2020
  • Latest release: Nov 1, 2020
  • Number of updates: 4
  • Update frequency: every 66.8 days
  • Top authors: bilalmalik12 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /464 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.00MB] [CPU: ▼3.42ms] Passed 4 tests

Server-side resources used by WC Myaccount Shortcodes
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.43 ▲5.25
Dashboard /wp-admin3.31 ▲0.0046.48 ▲0.83
Posts /wp-admin/edit.php3.36 ▲0.0043.36 ▼1.65
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.54 ▼14.53
Media Library /wp-admin/upload.php3.23 ▲0.0036.99 ▲1.67

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WC Myaccount Shortcodes
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4314.62 ▲0.081.83 ▲0.2443.61 ▲1.63
Dashboard /wp-admin2,195 ▲145.57 ▼0.1096.19 ▼4.4241.05 ▼3.81
Posts /wp-admin/edit.php2,082 ▼182.03 ▲0.0534.45 ▼0.7633.76 ▼3.39
Add New Post /wp-admin/post-new.php1,526 ▼023.65 ▲0.63668.24 ▼15.4749.49 ▼10.64
Media Library /wp-admin/upload.php1,403 ▲34.14 ▼0.0595.29 ▼9.3841.54 ▼1.44

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === woo-myaccount-shortcodes === )
You can take inspiration from this readme.txt

woo-myaccount-shortcodes/wc-myaccount-shortcodes.php 85% from 13 tests

The main file in "WC Myaccount Shortcodes" v. 1.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woo-myaccount-shortcodes.php" instead of "wc-myaccount-shortcodes.php")

Code Analysis Passed 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
Success! There were no dangerous files found in this plugin155 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13048131
CSS10024

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods17.69%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants4
▷ Global constants375.00%
▷ Class constants125.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin