10% happy-wp-anniversary

Code Review | Happy Wordpress Anniversay

WordPress plugin Happy Wordpress Anniversay scored10%from 54 tests.

About plugin

  • Plugin page: happy-wp-anniversary
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 13, 2020
  • Latest release: Oct 13, 2020
  • Number of updates: 2
  • Update frequency: every 58.0 days
  • Top authors: mrdwt9 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /306 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/happy-wp-anniversary/anniversary.php+33
    Use of undefined constant check_anniversary - assumed 'check_anniversary' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.94MB] [CPU: ▼52.42ms] Passed 4 tests

Server-side resources used by Happy Wordpress Anniversay
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.423.88 ▼37.77
Dashboard /wp-admin2.07 ▼1.245.89 ▼48.68
Posts /wp-admin/edit.php2.07 ▼1.296.37 ▼41.37
Add New Post /wp-admin/post-new.php2.07 ▼3.825.70 ▼81.87
Media Library /wp-admin/upload.php2.07 ▼1.164.97 ▼32.47

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Happy Wordpress Anniversay
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.21 ▼1.176.24 ▲4.5439.61 ▼7.49
Dashboard /wp-admin2,224 ▲214.87 ▼1.0398.97 ▼19.0239.06 ▼4.00
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0537.34 ▼2.6133.29 ▼3.32
Add New Post /wp-admin/post-new.php1,554 ▲2822.87 ▲5.32648.82 ▼35.8355.77 ▼4.33
Media Library /wp-admin/upload.php1,400 ▼34.25 ▲0.0495.79 ▼22.3744.11 ▼5.50

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/happy-wp-anniversary/anniversary.php+33
    Use of undefined constant check_anniversary - assumed 'check_anniversary' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/happy-wp-anniversary/anniversary.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
No plugin tags provided

happy-wp-anniversary/anniversary.php 85% from 13 tests

The main PHP file in "Happy Wordpress Anniversay" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("happy-wp-anniversary.php" instead of "anniversary.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 141 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected11 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP171711

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code1.00
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

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin