84% meks-themeforest-smart-widget

Code Review | Meks ThemeForest Smart Widget

WordPress plugin Meks ThemeForest Smart Widget scored84%from 54 tests.

About plugin

  • Plugin page: meks-themeforest-...
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Oct 2, 2013
  • Latest release: Sep 11, 2023
  • Number of updates: 50
  • Update frequency: every 72.6 days
  • Top authors: mekshq (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20,000+ active /266,791 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼2.00ms] Passed 4 tests

Analyzing server-side resources used by Meks ThemeForest Smart Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1139.92 ▼2.35
Dashboard /wp-admin3.41 ▲0.1144.78 ▼5.34
Posts /wp-admin/edit.php3.52 ▲0.1747.33 ▼2.10
Add New Post /wp-admin/post-new.php5.99 ▲0.1192.52 ▲3.83
Media Library /wp-admin/upload.php3.33 ▲0.1135.79 ▲1.78

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
widget_mks_themeforest_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Meks ThemeForest Smart Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲7013.20 ▼1.081.73 ▼0.2940.65 ▼2.28
Dashboard /wp-admin2,206 ▲245.91 ▲0.04101.00 ▼6.6648.04 ▲7.31
Posts /wp-admin/edit.php2,092 ▲32.04 ▼0.0139.19 ▲1.5733.64 ▼3.42
Add New Post /wp-admin/post-new.php1,533 ▼023.54 ▲0.35582.80 ▼82.8349.94 ▼1.66
Media Library /wp-admin/upload.php1,388 ▼34.22 ▲0.0396.24 ▼15.5640.83 ▼7.95

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_mks_themeforest_widget
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/meks-themeforest-smart-widget/inc/class-themeforest-widget.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/meks-themeforest-smart-widget/meks-themeforest-smart-widget.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: envato, themeforest, sidebar, ad, widget...

meks-themeforest-smart-widget/meks-themeforest-smart-widget.php 92% from 13 tests

This is the main PHP file of "Meks ThemeForest Smart Widget" version 1.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 335 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin707 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP210620405
PO File397100260
JavaScript13124
CSS11018

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity62.00
▷ Minimum class complexity62.00
▷ Maximum class complexity62.00
Average method complexity5.36
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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 were not PNG files found in your plugin