68% sell-media-file

Code Review | Sell Media File with Stripe

WordPress plugin Sell Media File with Stripe scored68%from 54 tests.

About plugin

  • Plugin page: sell-media-file
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.1
  • WordPress version: 6.3.1
  • First release: Oct 21, 2014
  • Latest release: Feb 23, 2019
  • Number of updates: 21
  • Update frequency: every 75.5 days
  • Top authors: naa986 (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

20+ active /6,186 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼1.09MB] [CPU: ▼42.51ms] Passed 4 tests

This is a short check of server-side resources used by Sell Media File with Stripe
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.89 ▼0.5816.06 ▼27.82
Dashboard /wp-admin2.93 ▼0.3818.16 ▼34.69
Posts /wp-admin/edit.php2.93 ▼0.4317.89 ▼36.17
Add New Post /wp-admin/post-new.php2.93 ▼2.9618.38 ▼71.36
Media Library /wp-admin/upload.php2.93 ▼0.3017.32 ▼17.09
All Orders /wp-admin/edit.php?post_type=sellmediafile_order2.9320.89
Settings /wp-admin/edit.php?post_type=sellmediafile_order&page=sell-media-file-settings2.9317.13
Add New /wp-admin/post-new.php?post_type=sellmediafile_order2.9316.65
Debug /wp-admin/edit.php?post_type=sellmediafile_order&page=sell-media-file-debug2.9318.05

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Sell Media File with Stripe
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,853 ▲6713.54 ▼0.821.75 ▼0.2239.37 ▼4.83
Dashboard /wp-admin2,256 ▲504.85 ▼0.21108.94 ▼4.5341.17 ▼0.75
Posts /wp-admin/edit.php2,135 ▲352.02 ▲0.0138.50 ▼0.8138.67 ▲1.10
Add New Post /wp-admin/post-new.php1,574 ▲2923.28 ▲0.07660.19 ▲4.2453.71 ▼1.70
Media Library /wp-admin/upload.php1,429 ▲294.26 ▲0.04100.16 ▼7.7445.58 ▲0.14
All Orders /wp-admin/edit.php?post_type=sellmediafile_order1,1361.9347.7630.56
Settings /wp-admin/edit.php?post_type=sellmediafile_order&page=sell-media-file-settings9472.0522.9427.58
Add New /wp-admin/post-new.php?post_type=sellmediafile_order1,4062.4950.1155.68
Debug /wp-admin/edit.php?post_type=sellmediafile_order&page=sell-media-file-debug8702.0523.0231.86

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
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Warning in wp-includes/class-wp-post-type.php+613
    Invalid argument supplied for foreach()
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=sellmediafile_order&page=sell-media-file-debug
    • > Warning in wp-includes/class-wp-post-type.php+613
    Invalid argument supplied for foreach()
    • > GET request to /wp-admin/edit.php?post_type=sellmediafile_order&page=sell-media-file-settings
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/edit.php?post_type=sellmediafile_order&page=sell-media-file-settings
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% 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
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sell-media-file/sell-media-file-order.php:143

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 describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: Please add descriptions for these screenshots #1, #2 in sell-media-file/assets to your readme.txt
The official readme.txt is a good inspiration

sell-media-file/main.php 92% from 13 tests

"Sell Media File with Stripe" version 1.0.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("sell-media-file.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected713 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP37039713

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity40.00
▷ Minimum class complexity40.00
▷ Maximum class complexity40.00
Average method complexity3.44
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.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 are no PNG files in this plugin