84% comic-sans-roulette

Code Review | Comic Sans Roulette

WordPress plugin Comic Sans Roulette scored84%from 54 tests.

About plugin

  • Plugin page: comic-sans-roulette
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8
  • WordPress version: 6.3.1
  • First release: Oct 14, 2014
  • Latest release: Oct 14, 2014
  • Number of updates: 3
  • Update frequency: every 8.4 days
  • Top authors: dustyf (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10+ active /843 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.00MB] [CPU: ▼3.19ms] Passed 4 tests

An overview of server-side resources used by Comic Sans Roulette
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0049.06 ▲10.23
Dashboard /wp-admin3.31 ▲0.0049.79 ▼3.50
Posts /wp-admin/edit.php3.36 ▲0.0053.98 ▲4.21
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.58 ▼20.59
Media Library /wp-admin/upload.php3.23 ▲0.0042.25 ▲7.13

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Comic Sans Roulette
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.38 ▲0.031.68 ▼0.0140.63 ▼1.32
Dashboard /wp-admin2,198 ▲185.57 ▲0.0293.57 ▲3.5438.36 ▼3.73
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0439.67 ▲2.7435.17 ▼4.84
Add New Post /wp-admin/post-new.php1,526 ▼023.16 ▲0.39681.21 ▼20.7351.06 ▼2.25
Media Library /wp-admin/upload.php1,400 ▼04.17 ▼0.07103.31 ▲2.9745.91 ▼1.03

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

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 fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/comic-sans-roulette/comic-sans-roulette.php:19

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 Passed 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
4 plugin tags: comic sans, joke, font, roulette

comic-sans-roulette/comic-sans-roulette.php Passed 13 tests

"Comic Sans Roulette" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
66 characters long description:
Randomly change all fonts on your site to Comic Sans on page load.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected8 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1298

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected