68% marketpress-frontend

Code Review | Marketpress Frontend

WordPress plugin Marketpress Frontend scored68%from 54 tests.

About plugin

  • Plugin page: marketpress-frontend
  • Plugin version: 2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.1
  • WordPress version: 6.3.1
  • First release: Mar 14, 2015
  • Latest release: Mar 14, 2015
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: corlax (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,443 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.20MB] [CPU: ▼6.02ms] Passed 4 tests

Server-side resources used by Marketpress Frontend
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1939.80 ▼1.60
Dashboard /wp-admin3.50 ▲0.2046.79 ▼3.05
Posts /wp-admin/edit.php3.62 ▲0.2646.66 ▼8.42
Add New Post /wp-admin/post-new.php6.09 ▲0.2085.68 ▼11.02
Media Library /wp-admin/upload.php3.43 ▲0.2036.33 ▼0.61

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 43 new files
Database: 1 new table, 7 new options
New tables
wp_store_frontend
New WordPress options
can_compress_scripts
custom_field_db_version
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Marketpress Frontend
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,041 ▲30613.95 ▼0.4310.14 ▲8.3641.65 ▼7.44
Dashboard /wp-admin2,226 ▲355.86 ▲0.99101.27 ▼11.6777.77 ▲34.33
Posts /wp-admin/edit.php2,106 ▲172.02 ▲0.0135.83 ▼0.6533.24 ▲0.38
Add New Post /wp-admin/post-new.php1,529 ▼417.49 ▼5.77735.85 ▲67.7853.37 ▲6.15
Media Library /wp-admin/upload.php1,396 ▲174.21 ▲0.03104.66 ▲0.9387.19 ▲44.76

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_store_frontend
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • custom_field_db_version
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/marketpress-frontend/lib/help.php
  • 20× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/marketpress-frontend/lib/edit_post.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/marketpress-frontend/lib/wpmpf-functions.php:4
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/marketpress-frontend/lib/custom-filed-functions.php on line 25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_Action() in wp-content/plugins/marketpress-frontend/lib/ajax-upload.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function site_url() in wp-content/plugins/marketpress-frontend/lib/lost.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/marketpress-frontend/lib/post.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/marketpress-frontend/lib/setting.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/marketpress-frontend/lib/support/marketpress.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/marketpress-frontend/lib/wp-store-functions.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/marketpress-frontend/lib/payment-setting.php:35

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: membership, frontend, plugins, marketpress, ecommerce...

marketpress-frontend/wp-mp-frontend.php 92% from 13 tests

The main PHP file in "Marketpress Frontend" ver. 2.5 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("marketpress-frontend.php" instead of "wp-mp-frontend.php")

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
Everything looks great! No dangerous files found in this plugin4,624 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP186163383,750
CSS402608
JavaScript54236266

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity5.00
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity1.89
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions54
▷ Named functions54100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.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
8 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/images/add.png18.09KB0.97KB▼ 94.62%
lib/images/close-button.png0.83KB0.90KB0.00%
images/error.png0.68KB0.72KB0.00%
images/success.png0.52KB0.52KB0.00%
lib/images/add2.png14.94KB0.96KB▼ 93.58%