83% current-year-and-footer-information

Code Review | Current Year and Footer Information

WordPress plugin Current Year and Footer Information scored 83% from 54 tests.

About plugin

  • Plugin page: current-year-and-...
  • Plugin version: 1.2.2
  • PHP compatiblity: 5.6.9+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.5
  • WordPress version: 6.3.1
  • First release: Jun 12, 2019
  • Latest release: Sep 3, 2020
  • Number of updates: 14
  • Update frequency: every 32.4 days
  • Top authors: inaudit (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 1,464 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Current Year and Footer Information
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0731.75 ▼12.30
Dashboard /wp-admin3.39 ▲0.0948.36 ▼3.12
Posts /wp-admin/edit.php3.51 ▲0.1549.62 ▼2.15
Add New Post /wp-admin/post-new.php5.97 ▲0.0993.76 ▲0.95
Media Library /wp-admin/upload.php3.32 ▲0.0936.69 ▲2.84

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Current Year and Footer Information
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲8113.19 ▼1.171.78 ▲0.0239.69 ▼7.90
Dashboard /wp-admin2,219 ▲285.83 ▲0.9899.28 ▼4.8839.20 ▼2.65
Posts /wp-admin/edit.php2,105 ▲162.05 ▲0.0439.93 ▲1.1834.90 ▲0.14
Add New Post /wp-admin/post-new.php1,546 ▲1323.42 ▲0.21673.25 ▲2.9954.01 ▼1.89
Media Library /wp-admin/upload.php1,404 ▲134.21 ▼0.0494.61 ▼9.9945.42 ▲0.69

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/current-year-and-footer-information/templates/shortcodes/legal-notice.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/current-year-and-footer-information/templates/shortcodes/cookies.php:13

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 86% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can look at the official readme.txt

current-year-and-footer-information/wp-cyfooterinfo.php 77% from 13 tests

The main PHP script in "Current Year and Footer Information" version 1.2.2 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("current-year-and-footer-information.php" instead of "wp-cyfooterinfo.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: The description should be shorter than 140 characters (currently 146 characters long)

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
No dangerous file extensions were detected510 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP791226304
PO File382160198
XML1008

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity7.00
▷ Minimum class complexity3.00
▷ Maximum class complexity10.00
Average method complexity1.78
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods23
▷ Static methods14.35%
▷ Public methods2191.30%
▷ Protected methods00.00%
▷ Private methods28.70%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin