10% envato-marketplace-widget

Code Review | Envato Marketplace Widget

WordPress plugin Envato Marketplace Widget scored10%from 54 tests.

About plugin

  • Plugin page: envato-marketplac...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4
  • WordPress version: 6.3.1
  • First release: Jul 14, 2012
  • Latest release: Jul 14, 2012
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: gholme4 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,713 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/envato-marketplace-widget/envato-widget.php+38
    Methods with the same name as their class will not be constructors in a future version of PHP; Envato_Widget has a deprecated constructor

Server metrics [RAM: ▼1.71MB] [CPU: ▼44.57ms] Passed 4 tests

Server-side resources used by Envato Marketplace Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.189.00 ▼29.42
Dashboard /wp-admin2.29 ▼1.0111.53 ▼36.45
Posts /wp-admin/edit.php2.29 ▼1.0611.49 ▼33.73
Add New Post /wp-admin/post-new.php2.29 ▼3.5910.16 ▼78.68
Media Library /wp-admin/upload.php2.29 ▼0.9410.86 ▼22.71

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_envato-widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Envato Marketplace Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.33 ▼0.961.84 ▼0.0544.82 ▲0.07
Dashboard /wp-admin2,203 ▲155.83 ▼0.20103.11 ▼10.5541.06 ▼8.12
Posts /wp-admin/edit.php2,092 ▲32.02 ▼0.0439.79 ▼2.4134.92 ▼3.47
Add New Post /wp-admin/post-new.php1,542 ▼018.17 ▼0.21613.21 ▲7.1948.78 ▼0.44
Media Library /wp-admin/upload.php1,385 ▼64.19 ▼0.0497.28 ▼3.1844.21 ▼1.00

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in Envato_Widget is deprecated since version 4.3.0! Use __construct() instead.
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_envato-widget
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/envato-marketplace-widget/envato-widget.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% 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:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Widget options), #2 (Widget)
You can look at the official readme.txt

envato-marketplace-widget/envato-widget.php 92% from 13 tests

The principal PHP file in "Envato Marketplace Widget" v. 1.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("envato-marketplace-widget.php" instead of "envato-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin144 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14330144

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.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

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.09MB with 0.06MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png49.45KB16.01KB▼ 67.62%
screenshot-1.png41.38KB15.85KB▼ 61.69%