84% themeloom-widgets

Code Review | ThemeLoom Widgets

WordPress plugin ThemeLoom Widgets scored84%from 54 tests.

About plugin

  • Plugin page: themeloom-widgets
  • Plugin version: 1.8.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.9.1
  • WordPress version: 6.3.1
  • First release: Apr 4, 2013
  • Latest release: Dec 16, 2017
  • Number of updates: 32
  • Update frequency: every 53.7 days
  • Top authors: livingos (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /4,567 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.48MB] [CPU: ▼7.24ms] Passed 4 tests

An overview of server-side resources used by ThemeLoom Widgets
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.02 ▲0.5542.33 ▼2.85
Dashboard /wp-admin3.83 ▲0.4950.93 ▼10.38
Posts /wp-admin/edit.php3.89 ▲0.5353.32 ▲5.07
Add New Post /wp-admin/post-new.php6.35 ▲0.4685.16 ▼16.34
Media Library /wp-admin/upload.php3.70 ▲0.4638.83 ▲0.60

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 31 new files
Database: no new tables, 12 new options
New WordPress options
widget_tl_fb_widget
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_los_show_pages
widget_los_showposts_widget
can_compress_scripts
widget_los_media_widget
widget_recent-posts
widget_themeloomflickrwidget
...

Browser metrics Passed 4 tests

ThemeLoom Widgets: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲4514.29 ▲0.021.76 ▲0.1840.46 ▼1.10
Dashboard /wp-admin2,195 ▲185.63 ▲0.0089.76 ▼4.2140.29 ▼1.91
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0435.47 ▲0.6934.20 ▼1.76
Add New Post /wp-admin/post-new.php1,528 ▲223.46 ▼0.00699.34 ▲52.8155.15 ▲5.36
Media Library /wp-admin/upload.php1,397 ▼34.26 ▲0.1199.34 ▼7.5044.65 ▼2.13

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 12 options in the database
    • widget_recent-posts
    • widget_themeloomflickrwidget
    • can_compress_scripts
    • db_upgraded
    • widget_tl_fb_widget
    • widget_los_twitter_widget
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_los_show_pages
    • theysaidso_admin_options
    • ...

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)
Good news, no errors were detected

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 items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/themeloom-widgets/show-widgets.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/themeloom-widgets/flickr-widget.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/themeloom-widgets/facebook-widget.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/themeloom-widgets/twitter-widget.php:86

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: pages, query, responsive, twitter, facebook...

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

This is the main PHP file of "ThemeLoom Widgets" version 1.8.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
128 characters long description:
A set of really useful widgets for showing posts, pages, tweets and your flickr images. Designed for use with responsive themes.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected2,456 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP85395251,910
PO File2154164358
CSS1227188

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity11.35
▷ Minimum class complexity1.00
▷ Maximum class complexity38.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes210.00%
▷ Concrete classes1890.00%
▷ Final classes00.00%
Methods115
▷ Static methods108.70%
▷ Public methods10187.83%
▷ Protected methods21.74%
▷ Private methods1210.43%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
13 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/format_link48.png1.04KB0.70KB▼ 32.93%
images/format_status48.png0.86KB0.62KB▼ 27.28%
images/format_page48.png0.31KB0.21KB▼ 30.91%
images/format_gallery48.png0.67KB0.48KB▼ 27.42%
images/format_chat48.png0.96KB0.70KB▼ 27.69%