84% marketpress-count-sales-product

Code Review | Marketpress Count Sales Product

WordPress plugin Marketpress Count Sales Product scored84%from 54 tests.

About plugin

  • Plugin page: marketpress-count...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Sep 24, 2014
  • Latest release: Sep 24, 2014
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: subhashnagda (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /763 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
Installer ran successfully

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

Analyzing server-side resources used by Marketpress Count Sales Product
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.80 ▼2.70
Dashboard /wp-admin3.31 ▲0.0148.64 ▼5.39
Posts /wp-admin/edit.php3.36 ▲0.0141.27 ▼6.33
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.58 ▼5.70
Media Library /wp-admin/upload.php3.23 ▲0.0134.62 ▲1.57

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Marketpress Count Sales Product
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲5413.30 ▼1.281.92 ▲0.0339.06 ▼7.76
Dashboard /wp-admin2,209 ▲185.90 ▲1.02100.14 ▼12.8939.74 ▼8.10
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0137.02 ▲0.3432.18 ▼0.13
Add New Post /wp-admin/post-new.php1,535 ▲2123.07 ▲5.41661.36 ▲15.3655.52 ▼5.77
Media Library /wp-admin/upload.php1,388 ▼34.23 ▲0.0194.51 ▼2.9041.12 ▼1.38

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/marketpress-count-sales-product/marketpress-count-sales-product.php:48

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% 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
These attributes need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === marketpress-count-sales-product === )
You can look at the official readme.txt

marketpress-count-sales-product/marketpress-count-sales-product.php Passed 13 tests

"Marketpress Count Sales Product" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
93 characters long description:
Easily show off the total number of products, your Marketpress store has sold,in a shortcode.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin18 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP123718

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin