78% reco-widget

Code Review | Reco Widget

WordPress plugin Reco Widget scored78%from 54 tests.

About plugin

  • Plugin page: reco-widget
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.3.1
  • WordPress version: 6.3.1
  • First release: Jan 17, 2012
  • Latest release: Jan 7, 2016
  • Number of updates: 16
  • Update frequency: every 90.7 days
  • Top authors: plux (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /1,922 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.32ms] Passed 4 tests

Analyzing server-side resources used by Reco Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.45 ▲1.51
Dashboard /wp-admin3.34 ▲0.0346.53 ▼0.71
Posts /wp-admin/edit.php3.39 ▲0.0345.60 ▼2.09
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.56 ▼15.63
Media Library /wp-admin/upload.php3.26 ▲0.0335.68 ▲1.15
Reco Widget /wp-admin/options-general.php?page=reco-widget-settings3.2230.34

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Reco Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲14113.57 ▼1.018.37 ▲6.8043.61 ▲3.56
Dashboard /wp-admin2,207 ▲194.86 ▼0.05101.30 ▼3.9739.09 ▼5.13
Posts /wp-admin/edit.php2,093 ▲42.02 ▼0.0233.36 ▼2.8036.30 ▲1.55
Add New Post /wp-admin/post-new.php1,536 ▲2223.46 ▲5.88685.05 ▲56.1558.13 ▼0.65
Media Library /wp-admin/upload.php1,395 ▲74.29 ▲0.1695.52 ▼16.9244.14 ▼4.35
Reco Widget /wp-admin/options-general.php?page=reco-widget-settings8022.0624.2427.81

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 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=reco-widget-settings
    • > Notice in wp-content/plugins/reco-widget/reco-widget.php+41
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/reco-widget/templates/reco-options-page.tpl.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/reco-widget/reco-widget.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === reco-widget === )
The official readme.txt might help

reco-widget/reco-widget.php Passed 13 tests

"Reco Widget" version 0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
29 characters long description:
Visar en widget från reco.se

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
Good job! No executable or dangerous file extensions detected288 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3289144
CSS1180120
JavaScript12024

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods375.00%
▷ Protected methods00.00%
▷ Private methods125.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/reco-logo.png4.04KB1.84KB▼ 54.42%