83% admin-filter-posts-by-year

Code Review | Plugin Name: Admin filter posts by year

WordPress plugin Plugin Name: Admin filter posts by yearscored83%from 54 tests.

About plugin

  • Plugin page: admin-filter-post...
  • Plugin version: 2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.3.2
  • WordPress version: 6.3.1
  • First release: May 8, 2014
  • Latest release: Oct 17, 2023
  • Number of updates: 14
  • Update frequency: every 246.8 days
  • Top authors: gilles66 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /3,727 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼9.76ms] Passed 4 tests

A check of server-side resources used by Plugin Name: Admin filter posts by year
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.62 ▼0.76
Dashboard /wp-admin3.31 ▲0.0140.62 ▼11.83
Posts /wp-admin/edit.php3.27 ▼0.0837.80 ▼8.01
Add New Post /wp-admin/post-new.php5.90 ▲0.0173.11 ▼18.42
Media Library /wp-admin/upload.php3.24 ▲0.0134.78 ▲0.89

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Plugin Name: Admin filter posts by year
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.26 ▼0.351.66 ▲0.0441.11 ▲3.95
Dashboard /wp-admin2,198 ▲215.63 ▼0.0094.18 ▲1.9141.67 ▲1.56
Posts /wp-admin/edit.php2,105 ▲51.98 ▼0.0139.57 ▼2.1038.88 ▲0.30
Add New Post /wp-admin/post-new.php1,528 ▲223.11 ▼0.42673.15 ▲62.4559.41 ▼4.01
Media Library /wp-admin/upload.php1,400 ▲64.19 ▼0.03112.28 ▲15.9348.28 ▲7.70

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

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)
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/admin-filter-posts-by-year/gwp_filter_posts_by_years.php:14

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === Plugin Name: Admin filter posts by year=== )
The official readme.txt might help

admin-filter-posts-by-year/gwp_filter_posts_by_years.php 85% from 13 tests

The entry point to "Plugin Name: Admin filter posts by year" version 2.3 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 150 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("admin-filter-posts-by-year.php" instead of "gwp_filter_posts_by_years.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected75 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2315875

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.24
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin