84% random-alan-partridge-quote-widget

Code Review | Alan Partridge Random Quote Widget

WordPress plugin Alan Partridge Random Quote Widget scored 84% from 54 tests.

About plugin

  • Plugin page: random-alan-partr...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Dec 16, 2017
  • Latest release: Dec 16, 2017
  • Number of updates: 15
  • Update frequency: every 0.6 days
  • Top authors: folderfabriek (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 627 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.35ms] Passed 4 tests

An overview of server-side resources used by Alan Partridge Random Quote Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.10 ▼6.85
Dashboard /wp-admin3.35 ▲0.0545.90 ▼6.02
Posts /wp-admin/edit.php3.40 ▲0.0547.25 ▼3.23
Add New Post /wp-admin/post-new.php5.93 ▲0.0592.27 ▼5.31
Media Library /wp-admin/upload.php3.27 ▲0.0435.29 ▲2.84

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_alan_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Alan Partridge Random Quote Widget: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.11 ▼1.121.64 ▼0.2239.99 ▼4.94
Dashboard /wp-admin2,209 ▲215.85 ▲0.8996.74 ▼25.0438.89 ▼6.60
Posts /wp-admin/edit.php2,092 ▲32.01 ▼0.0439.81 ▲5.0733.92 ▼1.00
Add New Post /wp-admin/post-new.php1,538 ▼423.29 ▲4.92588.17 ▼46.2254.08 ▲1.94
Media Library /wp-admin/upload.php1,388 ▼34.24 ▲0.0794.59 ▼12.4843.82 ▲1.72

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/random-alan-partridge-quote-widget/alan-quotes.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: widget, partridge, alan, quotes

random-alan-partridge-quote-widget/alan-quotes.php 92% from 13 tests

The main PHP script in "Alan Partridge Random Quote Widget" version 1.0.0 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("random-alan-partridge-quote-widget.php" instead of "alan-quotes.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected160 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12833160

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity6.25
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
PNG images were not found in this plugin