84% absolute-happiness

Code Review | Absolute Happiness

WordPress plugin Absolute Happiness scored84%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: 6.3.1
  • 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 /1,006 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
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Absolute Happiness
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0936.48 ▼2.54
Dashboard /wp-admin3.40 ▲0.0549.78 ▼10.77
Posts /wp-admin/edit.php3.45 ▲0.0948.85 ▼0.89
Add New Post /wp-admin/post-new.php6.04 ▲0.1594.53 ▼12.90
Media Library /wp-admin/upload.php3.32 ▲0.0935.13 ▲2.62

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, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Absolute Happiness
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.19 ▼0.541.55 ▼0.1840.97 ▲1.12
Dashboard /wp-admin2,192 ▲155.61 ▼0.0692.71 ▲6.4542.33 ▲0.35
Posts /wp-admin/edit.php2,100 ▼31.99 ▲0.0338.96 ▼3.1834.89 ▼5.76
Add New Post /wp-admin/post-new.php2,101 ▲57521.79 ▼1.61603.45 ▼4.7082.94 ▲27.82
Media Library /wp-admin/upload.php1,400 ▲64.15 ▼0.0396.81 ▼4.3139.58 ▼4.19

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/absolute-happiness/javascript/abh-enqueue-javascript.php:11
    • > 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/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/stylesheets/abh-enqueue-stylesheets.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: attitude, happy, positive, advantage, happiness

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

The primary PHP file in "Absolute Happiness" version 1.0.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • 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 an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected522 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP6119248491
JavaScript181926
CSS2055

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin