94% absolute-happiness

Code Review | Absolute Happiness

WordPress plugin Absolute Happiness scored 94% from 54 tests.

About plugin

  • Plugin page: absolute-happiness
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.1.1
  • WordPress version: 5.9.2
  • First release: Mar 23, 2015
  • Latest release: Mar 23, 2015
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: ericfrisino (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 840 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼297.49ms] Passed 4 tests

This is a short check of server-side resources used by Absolute Happiness
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1361.61 ▲2.29
Dashboard /wp-admin3.50 ▲0.0936.65 ▼2.55
Posts /wp-admin/edit.php3.73 ▲0.0946.28 ▼5.99
Add New Post /wp-admin/post-new.php7.01 ▲0.04110.60 ▼1,183.32
Media Library /wp-admin/upload.php3.38 ▲0.0928.55 ▲1.92

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Absolute Happiness
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,864 ▲14216.20 ▲0.547.20 ▲1.1719.24 ▲16.80
Dashboard /wp-admin2,895 ▲376.09 ▼0.13118.55 ▼16.04155.63 ▼17.69
Posts /wp-admin/edit.php2,694 ▼03.23 ▲0.0163.80 ▼2.16140.46 ▼2.72
Add New Post /wp-admin/post-new.php2,267 ▲59917.69 ▼0.32406.83 ▼9.28278.38 ▲121.00
Media Library /wp-admin/upload.php1,698 ▼05.50 ▼0.03145.02 ▲9.26179.39 ▼5.71

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means 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
  • 5× 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/absolute-happiness/hooks/publish_post.php:54
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/absolute-happiness/stylesheets/abh-enqueue-stylesheets.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/absolute-happiness/metadata/abh-metadata.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/absolute-happiness/hooks/the_content.php:121
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/absolute-happiness/javascript/abh-enqueue-javascript.php:11

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: positive, happiness, happy, attitude, advantage

absolute-happiness/absolute-happiness.php 92% from 13 tests

Analyzing the main PHP file in "Absolute Happiness" version 1.0.0
Please take the time to fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin522 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP6119248491
JavaScript181926
CSS2055

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.53
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%
Functions13
▷ Named functions13100.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
There are no PNG files in this plugin