83% crazy-pills

Code Review | Crazy Pills

WordPress plugin Crazy Pills scored83%from 54 tests.

About plugin

  • Plugin page: crazy-pills
  • Plugin version: 0.4.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.8
  • WordPress version: 6.3.1
  • First release: Mar 23, 2012
  • Latest release: Jun 25, 2017
  • Number of updates: 62
  • Update frequency: every 31.0 days
  • Top authors: shazdeh (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

300+ active /6,580 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.02ms] Passed 4 tests

Server-side resources used by Crazy Pills
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0344.75 ▲1.84
Dashboard /wp-admin3.38 ▲0.0751.82 ▼0.13
Posts /wp-admin/edit.php3.38 ▲0.0250.52 ▼6.19
Add New Post /wp-admin/post-new.php5.92 ▲0.0396.54 ▼7.59
Media Library /wp-admin/upload.php3.25 ▲0.0240.42 ▲3.65

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by Crazy Pills
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.27 ▼0.101.70 ▼0.4138.23 ▼5.42
Dashboard /wp-admin2,197 ▲205.65 ▲0.0388.69 ▼8.6840.48 ▼13.19
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0441.28 ▼1.6738.79 ▼0.04
Add New Post /wp-admin/post-new.php1,533 ▲722.93 ▼0.11643.56 ▼31.1658.60 ▼5.97
Media Library /wp-admin/upload.php1,400 ▲34.23 ▼0.06102.31 ▼3.6045.11 ▼4.95

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/crazy-pills/includes/config.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/crazy-pills/init.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found


Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: styles, editor, notification, tinymce, button...

crazy-pills/init.php 77% from 13 tests

"Crazy Pills" version 0.4.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 145 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("crazy-pills.php" instead of "init.php")
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin258 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ 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
22 PNG files occupy 0.07MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/warning_32.png3.74KB1.20KB▼ 67.89%
images/black_checklist.png3.18KB0.57KB▼ 82.02%
images/bullet_yellow.png2.85KB0.25KB▼ 91.25%
images/blue_checklist.png3.23KB0.59KB▼ 81.81%
images/bullet_blue.png2.85KB0.25KB▼ 91.26%