84% widgets-reloaded

Code Review | Widgets Reloaded

WordPress plugin Widgets Reloaded scored 84% from 54 tests.

About plugin

  • Plugin page: widgets-reloaded
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-4.8.2
  • WordPress version: 6.3.1
  • First release: Mar 5, 2009
  • Latest release: Sep 21, 2017
  • Number of updates: 27
  • Update frequency: every 118.7 days
  • Top authors: greenshady (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

2,000+ active / 64,072 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.57MB] [CPU: ▼4.23ms] Passed 4 tests

Analyzing server-side resources used by Widgets Reloaded
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.05 ▲0.5943.34 ▼2.42
Dashboard /wp-admin3.87 ▲0.5647.82 ▲3.73
Posts /wp-admin/edit.php3.98 ▲0.6246.58 ▼4.65
Add New Post /wp-admin/post-new.php6.45 ▲0.5688.15 ▼10.25
Media Library /wp-admin/upload.php3.79 ▲0.5636.92 ▲0.40

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 29 new files
Database: no new tables, 14 new options
New WordPress options
theysaidso_admin_options
widget_hybrid-archives
can_compress_scripts
db_upgraded
widget_hybrid-categories
widget_recent-comments
widget_hybrid-calendar
widget_hybrid-pages
widget_hybrid-nav-menu
widget_reloaded-posts
...

Browser metrics Passed 4 tests

A check of browser resources used by Widgets Reloaded
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.68 ▼0.882.20 ▼0.0638.46 ▼9.41
Dashboard /wp-admin2,209 ▲185.08 ▲0.1598.38 ▼5.6439.72 ▼4.33
Posts /wp-admin/edit.php2,089 ▼32.03 ▲0.0234.87 ▼6.8235.93 ▲0.42
Add New Post /wp-admin/post-new.php1,534 ▼423.25 ▲0.17719.25 ▲64.5661.68 ▼2.35
Media Library /wp-admin/upload.php1,391 ▲34.18 ▼0.0299.86 ▼12.0942.44 ▼3.15

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 14 options in the database
    • widget_hybrid-categories
    • widget_hybrid-pages
    • widget_reloaded-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_hybrid-archives
    • widget_hybrid-authors
    • widget_hybrid-tags
    • ...

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 12× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/widgets-reloaded/inc/widgets/class-widget.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Widgets_Reloaded\\add_action() in wp-content/plugins/widgets-reloaded/inc/functions-core.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Widgets_Reloaded\\Widgets\\Widget' not found in wp-content/plugins/widgets-reloaded/inc/widgets/class-posts.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Widgets_Reloaded\\Widgets\\Widget' not found in wp-content/plugins/widgets-reloaded/inc/widgets/class-archives.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Widgets_Reloaded\\Widgets\\Widget' not found in wp-content/plugins/widgets-reloaded/inc/widgets/class-pages.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Widgets_Reloaded\\Widgets\\Widget' not found in wp-content/plugins/widgets-reloaded/inc/widgets/class-tags.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Widgets_Reloaded\\Widgets\\Widget' not found in wp-content/plugins/widgets-reloaded/inc/widgets/class-bookmarks.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Widgets_Reloaded\\Widgets\\Widget' not found in wp-content/plugins/widgets-reloaded/inc/widgets/class-calendar.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Widgets_Reloaded\\trailingslashit() in wp-content/plugins/widgets-reloaded/widgets-reloaded.php:76
    • > PHP Fatal error
      Uncaught Error: Class 'Widgets_Reloaded\\Widgets\\Widget' not found in wp-content/plugins/widgets-reloaded/inc/widgets/class-authors.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (Archives widget), #2 (Authors widget), #3 (Bookmarks widget), #4 (Calendar widget), #5 (Categories widget), #6 (Menu widget), #7 (Pages widget), #8 (Posts widget), #9 (Tags widget)
You can take inspiration from this readme.txt

widgets-reloaded/widgets-reloaded.php Passed 13 tests

The principal PHP file in "Widgets Reloaded" v. 1.0.0 is loaded by WordPress automatically on each request
115 characters long description:
Adds many advanced widgets to the site and gives users much more flexibility than the core WordPress widgets offer.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin2,347 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP127048721,922
Markdown41120392
CSS28333

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity14.18
▷ Minimum class complexity2.00
▷ Maximum class complexity38.00
Average method complexity4.22
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes11
▷ Abstract classes19.09%
▷ Concrete classes1090.91%
▷ Final classes110.00%
Methods45
▷ Static methods12.22%
▷ Public methods4293.33%
▷ Protected methods00.00%
▷ Private methods36.67%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
9 PNG files occupy 0.25MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-8.png17.70KB6.50KB▼ 63.25%
screenshot-2.png25.85KB9.34KB▼ 63.85%
screenshot-1.png18.10KB6.27KB▼ 65.36%
screenshot-6.png25.50KB8.76KB▼ 65.66%
screenshot-3.png47.11KB15.82KB▼ 66.42%