83% demomentsomtres-woocommerce-default-price

Code Review | DeMomentSomTres WooCommerce Default Price

WordPress plugin DeMomentSomTres WooCommerce Default Price scored83%from 54 tests.

About plugin

  • Plugin page: demomentsomtres-w...
  • Plugin version: 201711292000...
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.6
  • WordPress version: 6.3.1
  • First release: Jul 3, 2018
  • Latest release: Jul 3, 2018
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: marcqueralt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

A check of server-side resources used by DeMomentSomTres WooCommerce Default Price
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.56 ▼0.86
Dashboard /wp-admin3.31 ▲0.0147.13 ▼4.71
Posts /wp-admin/edit.php3.36 ▲0.0047.50 ▲3.10
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.85 ▲2.02
Media Library /wp-admin/upload.php3.23 ▲0.0033.20 ▼0.58

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for DeMomentSomTres WooCommerce Default Price
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.63 ▼0.741.79 ▼0.1741.64 ▼6.57
Dashboard /wp-admin2,209 ▲244.87 ▼1.02106.90 ▲4.0141.11 ▲0.89
Posts /wp-admin/edit.php2,089 ▼02.03 ▼0.0039.54 ▲5.7035.77 ▼1.63
Add New Post /wp-admin/post-new.php1,543 ▲718.42 ▼4.99610.09 ▼23.9048.35 ▼2.94
Media Library /wp-admin/upload.php1,391 ▲34.26 ▲0.0296.50 ▼10.2742.17 ▼2.04

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • 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)
Good news, no errors were detected

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
The following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/demomentsomtres-woocommerce-default-price/lib/class-tgm-plugin-activation.php:1910
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/demomentsomtres-woocommerce-default-price/demomentsomtres-wc-default-price.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: all posts, archives, category

demomentsomtres-woocommerce-default-price/demomentsomtres-wc-default-price.php 69% from 13 tests

"DeMomentSomTres WooCommerce Default Price" version 201711292000...'s main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Version: The version number should only use digits and periods (ex. "1.0.3" instead of "201711292000...")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("demomentsomtres-woocommerce-default-price.php" instead of "demomentsomtres-wc-default-price.php")
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin1,762 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP24781,4801,729
Markdown121033

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity39.25
▷ Minimum class complexity1.00
▷ Maximum class complexity178.00
Average method complexity4.15
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods97
▷ Static methods55.15%
▷ Public methods7779.38%
▷ Protected methods2020.62%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin