94% waj-copyright-year

Code Review | WAJ Copyright Year

WordPress plugin WAJ Copyright Year scored 94% from 54 tests.

About plugin

  • Plugin page: waj-copyright-year
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-5.2
  • WordPress version: 5.8.1
  • First release: Oct 25, 2018
  • Latest release: May 8, 2019
  • Number of updates: 9
  • Update frequency: every 21.8 days
  • Top authors: waughjai (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 555 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼143.89ms] Passed 4 tests

A check of server-side resources used by WAJ Copyright Year
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.1836.64 ▲15.58
Dashboard /wp-admin3.12 ▲0.0653.86 ▲6.49
Posts /wp-admin/edit.php3.23 ▲0.1247.18 ▼2.21
Add New Post /wp-admin/post-new.php5.48 ▲0.0595.48 ▼571.30
Media Library /wp-admin/upload.php3.06 ▲0.0532.66 ▼8.54

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 23 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by WAJ Copyright Year
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.94 ▲0.249.58 ▼0.9446.33 ▼1.75
Dashboard /wp-admin2,973 ▲425.90 ▼0.03136.11 ▼11.75107.18 ▼1.37
Posts /wp-admin/edit.php2,739 ▼02.70 ▼0.0265.49 ▲2.4380.67 ▼5.27
Add New Post /wp-admin/post-new.php1,683 ▲18318.68 ▲0.05399.59 ▲21.23111.19 ▲5.61
Media Library /wp-admin/upload.php1,807 ▼05.02 ▼0.05157.13 ▼3.20113.15 ▼6.87

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

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
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/waj-copyright-year/vendor/waughj/test-hash-item/tests/TestHashItemTest.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/waj-copyright-year/waj-copyright-year.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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: year, new year, auto-update, copyright, footer

waj-copyright-year/waj-copyright-year.php Passed 13 tests

This is the main PHP file of "WAJ Copyright Year" version 1.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
75 characters long description:
Simple plugin for handling auto-updating copyright year in website footers.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin668 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12109166549
JSON30094
Markdown111013
XML10012

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity12.20
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods37
▷ Static methods410.81%
▷ Public methods3697.30%
▷ Protected methods00.00%
▷ Private methods12.70%
Functions17
▷ Named functions1164.71%
▷ Anonymous functions635.29%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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 were not PNG files found in your plugin