10% 404-the-book-of-changes

Code Review | 404 The Book of Changes

WordPress plugin 404 The Book of Changes scored 10% from 54 tests.

About plugin

  • Plugin page: 404-the-book-of-c...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.5
  • WordPress version: 5.9.2
  • First release: Dec 25, 2016
  • Latest release: Apr 4, 2018
  • Number of updates: 126
  • Update frequency: every 3.7 days
  • Top authors: montashov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,179 total downloads

Benchmarks

Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/404-the-book-of-changes/404_the_book_of_changes.php+85
    Undefined variable: user_ID

Server metrics [RAM: ▲0.01MB] [CPU: ▼302.97ms] Passed 4 tests

An overview of server-side resources used by 404 The Book of Changes
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.0656.05 ▲3.67
Dashboard /wp-admin3.45 ▲0.0440.42 ▼21.03
Posts /wp-admin/edit.php3.67 ▲0.0350.72 ▲10.91
Add New Post /wp-admin/post-new.php6.91 ▼0.0694.42 ▼1,193.02
Media Library /wp-admin/upload.php3.33 ▲0.0329.92 ▼1.51
404 The Book of Changes (I Ching) /wp-admin/options-general.php?page=options_404tboc3.3325.09

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 288 new files
Database: no new tables, 9 new options
New WordPress options
skin-404tboc
page-404tboc
text-button-main404tboc
text-button-continue404tboc
text-button-restart404tboc
startText404tboc
is-text-button-restart404tboc
is-text-support404tboc
is-page-404tboc

Browser metrics Passed 4 tests

404 The Book of Changes: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,792 ▲4815.92 ▼0.076.18 ▲0.482.32 ▲0.14
Dashboard /wp-admin2,897 ▲396.12 ▼0.09114.48 ▼18.81154.56 ▼8.65
Posts /wp-admin/edit.php2,693 ▲213.24 ▲0.0173.44 ▼14.10144.44 ▼6.23
Add New Post /wp-admin/post-new.php1,690 ▲2918.15 ▲1.58425.64 ▼5.02159.43 ▼1.65
Media Library /wp-admin/upload.php1,703 ▲85.50 ▼0.01144.17 ▼3.59186.48 ▼9.10
404 The Book of Changes (I Ching) /wp-admin/options-general.php?page=options_404tboc1,1832.7859.54174.17

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

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
Even though everything seems fine, this is not an exhaustive test

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
  • 5× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/404-the-book-of-changes/404_the_book_of_changes.php
    • > /wp-content/plugins/404-the-book-of-changes/admin-wp-404-page.php
    • > /wp-content/plugins/404-the-book-of-changes/random-text-wp-404-page.php
    • > /wp-content/plugins/404-the-book-of-changes/content_wp-404-page.php
    • > /wp-content/plugins/404-the-book-of-changes/skinsAdmin404.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 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: error 404, i ching, page 404, 404

404-the-book-of-changes/404_the_book_of_changes.php 77% from 13 tests

The primary PHP file in "404 The Book of Changes" version 1.4 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 345 characters long)
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("404-the-book-of-changes.php" instead of "404_the_book_of_changes.php")

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
There were no executable files found in this plugin2,106 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
CSS360551,458
PHP64336450
PO File27064198

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
80 PNG files occupy 2.43MB with 1.48MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
textsImages/45.png39.53KB14.97KB▼ 62.13%
skins/skin2/ask.png10.80KB4.14KB▼ 61.65%
textsImages/34.png34.63KB13.31KB▼ 61.58%
skins/skin3/0.png5.82KB2.49KB▼ 57.18%
textsImages/2.png44.35KB16.86KB▼ 61.99%