62% marketpowerwp

Code Review | MarketPowerWP

WordPress plugin MarketPowerWP scored62%from 54 tests.

About plugin

  • Plugin page: marketpowerwp
  • Plugin version: 2.2.9
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 3, 2014
  • Latest release: Apr 5, 2023
  • Number of updates: 72
  • Update frequency: every 43.6 days
  • Top authors: AmitDeyUS (94.44%)dextercampos (6.94%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,467 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼1.76MB] [CPU: ▼63.28ms] Passed 4 tests

Server-side resources used by MarketPowerWP
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.94 ▲0.4850.52 ▲8.90
Dashboard /wp-admin2.20 ▼1.156.25 ▼60.62
Posts /wp-admin/edit.php2.20 ▼1.166.31 ▼48.86
Add New Post /wp-admin/post-new.php2.20 ▼3.697.72 ▼116.09
Media Library /wp-admin/upload.php2.20 ▼1.036.72 ▼27.56
Replication Shortcodes /wp-admin/admin.php?page=replication2.206.58
Settings /wp-admin/admin.php?page=multisoft-mpp-settings2.206.58

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 103 new files
Database: no new tables, 13 new options
New WordPress options
multisoft_mpp_web_path
widget_theysaidso_widget
multisoft_mpp_autoprefix
widget_recent-comments
theysaidso_admin_options
db_upgraded
multisoft_mpp_replication_path_query_format
multisoft_mpp_replication_path
multisoft_mpp_check_site_name_path_query_format
multisoft_mpp_check_site_name_path
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for MarketPowerWP
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,956 ▲21014.10 ▼0.466.36 ▲4.5942.89 ▼0.00
Dashboard /wp-admin2,250 ▲595.15 ▼0.73118.79 ▲13.6138.54 ▼3.67
Posts /wp-admin/edit.php2,136 ▲442.33 ▲0.2134.51 ▼6.9830.79 ▼4.65
Add New Post /wp-admin/post-new.php1,558 ▲3921.91 ▼1.24679.94 ▲50.4962.96 ▲14.37
Media Library /wp-admin/upload.php1,433 ▲484.45 ▲0.21101.14 ▼8.0741.75 ▼4.19
Replication Shortcodes /wp-admin/admin.php?page=replication8891.9631.3338.18
Settings /wp-admin/admin.php?page=multisoft-mpp-settings9432.0828.5128.41

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the leplugin-jquery-ui-css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin did not uninstall successfully, leaving 13 options in the database
    • multisoft_mpp_replication_path_query_format
    • db_upgraded
    • multisoft_mpp_replication_path
    • can_compress_scripts
    • multisoft_mpp_check_site_name_path_query_format
    • multisoft_mpp_autoprefix
    • theysaidso_admin_options
    • multisoft_mpp_check_site_name_path
    • multisoft_mpp_default_replicated_site_name
    • widget_recent-comments
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=multisoft-mpp-settings
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the leplugin-jquery-ui-css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=multisoft-mpp-settings
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the leplugin-font-awesome-css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

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
Please take a closer look at the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/marketpowerwp/js/mpp/adf.phpvars.php
    • > /wp-content/plugins/marketpowerwp/js/leplugin.phpvars.php
  • 48× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'LePlugin\\Core\\View' not found in wp-content/plugins/marketpowerwp/src/LePlugin/Core/AdminHeaderView.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'LePlugin\\Core\\AbstractController' not found in wp-content/plugins/marketpowerwp/src/Multisoft/MPP/Distributor/DistributorController.php:14
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/marketpowerwp/views/mpp/deployment_general_settings_section.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_dropdown_pages() in wp-content/plugins/marketpowerwp/views/mpp_replication_general_settings_section.php:8
    • > PHP Warning
      require(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/marketpowerwp/autoloader.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'LePlugin\\Core\\AbstractController' not found in wp-content/plugins/marketpowerwp/src/Multisoft/MPP/Replication/ReplicationController.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'LePlugin\\Api\\ApiController' not found in wp-content/plugins/marketpowerwp/src/LePlugin/Core/CoreApiController.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Psr\\Log\\AbstractLogger' not found in wp-content/plugins/marketpowerwp/src/Katzgrau/KLogger/Logger.php:29
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/marketpowerwp/views/mpp/distributor/add/form_frame.php:1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/marketpowerwp/views/mpp_replication_advanced_settings_section.php:9

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 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 to be fixed:
  • Requires at least: Version format is invalid
The official readme.txt is a good inspiration

marketpowerwp/leplugin.php 92% from 13 tests

The principal PHP file in "MarketPowerWP" v. 2.2.9 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("marketpowerwp.php" instead of "leplugin.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
Good job! No executable or dangerous file extensions detected8,558 lines of code in 87 files:
LanguageFilesBlank linesComment linesLines of code
PHP678511,0475,162
JSON4801,126
JavaScript85562,5361,030
SVG200928
Markdown11450291
CSS311119
HTML2062

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity14.28
▷ Minimum class complexity1.00
▷ Maximum class complexity197.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces10
Interfaces3
Traits0
Classes43
▷ Abstract classes613.95%
▷ Concrete classes3786.05%
▷ Final classes00.00%
Methods341
▷ Static methods3911.44%
▷ Public methods26377.13%
▷ Protected methods6218.18%
▷ Private methods164.69%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants88
▷ Global constants2225.00%
▷ Class constants6675.00%
▷ Public constants66100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin