84% orange-themes-custom-widgets

Code Review | Orange Themes Custom Widgets

WordPress plugin Orange Themes Custom Widgets scored 84% from 54 tests.

About plugin

  • Plugin page: orange-themes-cus...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.7.3
  • WordPress version: 5.8.1
  • First release: Nov 8, 2016
  • Latest release: Mar 8, 2017
  • Number of updates: 16
  • Update frequency: every 7.3 days
  • Top authors: orangethemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

2,000+ active / 18,291 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.41MB] [CPU: ▼137.49ms] Passed 4 tests

An overview of server-side resources used by Orange Themes Custom Widgets
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.23 ▲0.3939.64 ▲4.30
Dashboard /wp-admin3.53 ▲0.4852.63 ▲3.41
Posts /wp-admin/edit.php3.58 ▲0.4758.00 ▲8.95
Add New Post /wp-admin/post-new.php5.81 ▲0.38101.28 ▼554.78
Media Library /wp-admin/upload.php3.39 ▲0.3838.02 ▼2.88

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_ot_widgets_social
widget_ot_widgets_ad_widget
widget_ot_widgets_features
widget_ot_widgets_about_author
widget_ot_widgets_team
widget_ot_widgets_latest_posts

Browser metrics Passed 4 tests

A check of browser resources used by Orange Themes Custom Widgets
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,929 ▲33317.64 ▲2.157.34 ▼4.5947.13 ▼4.67
Dashboard /wp-admin3,193 ▲2598.12 ▲2.02178.87 ▲18.12126.57 ▲10.41
Posts /wp-admin/edit.php2,988 ▲2494.42 ▲1.7489.83 ▲6.2889.14 ▼5.48
Add New Post /wp-admin/post-new.php1,636 ▼4720.68 ▲2.37267.69 ▼170.97123.31 ▼2.38
Media Library /wp-admin/upload.php1,834 ▲274.97 ▼0.06122.84 ▼41.04126.31 ▼5.66

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_ot_widgets_team
    • widget_ot_widgets_ad_widget
    • widget_ot_widgets_latest_posts
    • widget_ot_widgets_social
    • widget_ot_widgets_features
    • widget_ot_widgets_about_author

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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 fix the following
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/orange-themes-custom-widgets/widgets/features.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/orange-themes-custom-widgets/widgets/latest-posts.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/orange-themes-custom-widgets/widgets/team.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/orange-themes-custom-widgets/widgets/ad-widget.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/orange-themes-custom-widgets/widgets/social.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/orange-themes-custom-widgets/widgets/about-author.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: one page, portfolio, latest posts, projects, widgets...

orange-themes-custom-widgets/ot_widgets.php 92% from 13 tests

The main file in "Orange Themes Custom Widgets" v. 1.0.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("orange-themes-custom-widgets.php" instead of "ot_widgets.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin2,729 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP92441062,537
CSS1259148
JavaScript116044

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity10.62
▷ Minimum class complexity3.00
▷ Maximum class complexity23.00
Average method complexity3.20
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods35
▷ Static methods25.71%
▷ Public methods35100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions225.00%
▷ Anonymous functions675.00%
Constants3
▷ Global constants3100.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
No PNG files were detected