10% wp-anniversary

Code Review | WP Anniversary

WordPress plugin WP Anniversary scored 10% from 54 tests.

About plugin

  • Plugin page: wp-anniversary
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5.1
  • WordPress version: 6.3.1
  • First release: Apr 19, 2013
  • Latest release: May 9, 2013
  • Number of updates: 15
  • Update frequency: every 1.3 days
  • Top authors: iworks (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 796 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
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/wp-anniversary/includes/class-iworks-wp-anniversary-widget.php+216
    Function create_function() is deprecated

Server metrics [RAM: ▼1.68MB] [CPU: ▼51.88ms] Passed 4 tests

Server-side resources used by WP Anniversary
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.31 ▼1.156.15 ▼33.17
Dashboard /wp-admin2.33 ▼0.9712.18 ▼33.68
Posts /wp-admin/edit.php2.33 ▼1.027.60 ▼46.07
Add New Post /wp-admin/post-new.php2.33 ▼3.557.86 ▼94.59
Media Library /wp-admin/upload.php2.33 ▼0.907.67 ▼27.26
WP Anniversary /wp-admin/options-general.php?page=wp-anniversary/admin/index.php2.337.05

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 12 new options
New WordPress options
widget_wp-anniversary
wp-anniversary-version
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
wp-anniversary-last_update
widget_recent-posts
db_upgraded
iworks_cache_stamp
theysaidso_admin_options
...

Browser metrics Passed 4 tests

Checking browser requirements for WP Anniversary
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲7613.16 ▼1.601.76 ▼0.0539.04 ▼7.04
Dashboard /wp-admin2,214 ▲325.80 ▲0.9097.17 ▼9.4438.18 ▼1.80
Posts /wp-admin/edit.php2,099 ▲102.00 ▼0.0541.46 ▲3.9838.82 ▲7.62
Add New Post /wp-admin/post-new.php1,545 ▲1223.36 ▲0.24672.37 ▲59.6952.75 ▼28.70
Media Library /wp-admin/upload.php1,393 ▲84.22 ▲0.02103.57 ▼2.9141.67 ▼3.23
WP Anniversary /wp-admin/options-general.php?page=wp-anniversary/admin/index.php1,0222.5236.6024.57

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/wp-anniversary/includes/class-iworks-wp-anniversary-widget.php+216
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 12 options
    • wp-anniversary-last_update
    • db_upgraded
    • iworks_cache_stamp
    • widget_recent-comments
    • widget_wp-anniversary
    • widget_wp-anniversary-city-list
    • widget_theysaidso_widget
    • wp-anniversary-version
    • widget_recent-posts
    • can_compress_scripts
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-anniversary/admin/index.php
    • > Deprecated in wp-content/plugins/wp-anniversary/includes/class-iworks-wp-anniversary-meetup-widget.php+190
    Function create_function() is deprecated
    • > GET request to /wp-admin/options-general.php?page=wp-anniversary/admin/index.php
    • > Notice in wp-content/plugins/wp-anniversary/includes/class-iworks-options.php+48
    Accessing static property IworksOptions::$version as non static
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-anniversary/admin/index.php
    • > Notice in wp-content/plugins/wp-anniversary/includes/class-iworks-wp-anniversary.php+186
    Accessing static property iWorks_WP_Anniversary::$see_all as non static
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-anniversary/admin/index.php
    • > Notice in wp-content/plugins/wp-anniversary/includes/class-iworks-wp-anniversary.php+167
    Accessing static property iWorks_WP_Anniversary::$version as non static
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-anniversary/admin/index.php
    • > Notice in wp-content/plugins/wp-anniversary/includes/class-iworks-wp-anniversary.php+49
    Accessing static property iWorks_WP_Anniversary::$base as non static
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-anniversary/admin/index.php
    • > Notice in wp-content/plugins/wp-anniversary/includes/class-iworks-wp-anniversary.php+102
    Accessing static property iWorks_WP_Anniversary::$dir as non static
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-anniversary/admin/index.php
    • > Notice in wp-content/plugins/wp-anniversary/includes/class-iworks-wp-anniversary.php+130
    Accessing static property iWorks_WP_Anniversary::$capability as non static
    • > GET request to /wp-admin/options-general.php?page=wp-anniversary/admin/index.php
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=wp-anniversary/admin/index.php
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-anniversary/admin/index.php
    • > Notice in wp-content/plugins/wp-anniversary/includes/class-iworks-wp-anniversary.php+245
    Trying to get property 'error' of non-object
    • > GET request to /wp-admin/options-general.php?page=wp-anniversary/admin/index.php
    • > Notice in wp-content/plugins/wp-anniversary/includes/class-iworks-wp-anniversary.php+245
    Trying to get property 'code' of non-object
    • > GET request to /wp-admin/options-general.php?page=wp-anniversary/admin/index.php
    • > Notice in wp-content/plugins/wp-anniversary/includes/class-iworks-wp-anniversary.php+245
    Trying to get property 'message' of non-object
    • > GET request to /wp-admin/options-general.php?page=wp-anniversary/admin/index.php
    • > Warning in wp-content/plugins/wp-anniversary/admin/index.php+29
    count(): Parameter must be an array or an object that implements Countable

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 take a closer look at the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/wp-anniversary/admin/index.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-anniversary/includes/class-iworks-wp-anniversary-meetup-widget.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-anniversary/includes/class-iworks-wp-anniversary-widget.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Site), #2 (Widget configuration), #3 (Widget), #4 (Widget with square logo)
You can look at the official readme.txt

wp-anniversary/wp-anniversary.php Passed 13 tests

This is the main PHP file of "WP Anniversary" version 1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
36 characters long description:
WordPress Anniversary widget, badge.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin1,284 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP81382721,144
PO File15570140

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Method cyclomatic complexity should be reduced to less than 100 (currently 150)
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity61.50
▷ Minimum class complexity10.00
▷ Maximum class complexity190.00
Average method complexity6.90
▷ Minimum method complexity1.00
▷ Maximum method complexity150.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods41
▷ Static methods00.00%
▷ Public methods3687.80%
▷ Protected methods00.00%
▷ Private methods512.20%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
6 PNG files occupy 0.32MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png63.15KB29.47KB▼ 53.33%
screenshot-3.png79.07KB33.31KB▼ 57.88%
images/10th-square.png1.93KB1.94KB0.00%
screenshot-1.png144.23KB60.16KB▼ 58.29%
images/10th.png5.31KB5.41KB0.00%