83% auto-date-year-month

Code Review | AADMY - Add Auto Date Month Year Into Posts

WordPress plugin AADMY - Add Auto Date Month Year Into Posts scored83%from 54 tests.

About plugin

  • Plugin page: auto-date-year-month
  • Plugin version: 1.1.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Dec 21, 2022
  • Latest release: Nov 19, 2023
  • Number of updates: 52
  • Update frequency: every 6.4 days
  • Top authors: numanrki (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /1,853 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲4.96MB] [CPU: ▲20.99ms] 75% from 4 tests

Analyzing server-side resources used by AADMY - Add Auto Date Month Year Into Posts
It is recommended to improve the following
  • CPU: The total CPU usage must kept under 500.00ms (currently 2,415.13ms on /wp-admin/options-general.php?page=aadmy-settings)
PageMemory (MB)CPU Time (ms)
Home /8.86 ▲5.3961.12 ▲22.34
Dashboard /wp-admin8.88 ▲5.5766.76 ▲17.69
Posts /wp-admin/edit.php8.88 ▲5.5275.15 ▲26.58
Add New Post /wp-admin/post-new.php9.26 ▲3.37108.27 ▲17.35
Media Library /wp-admin/upload.php8.88 ▲5.6565.09 ▲33.45
Freemius Debug [v.2.5.6] /wp-admin/admin.php?page=freemius8.8855.56
AADMY Shortcodes /wp-admin/options-general.php?page=aadmy-settings8.882,415.13

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 189 new files
Database: no new tables, 9 new options
New WordPress options
fs_debug_mode
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
fs_accounts
db_upgraded
theysaidso_admin_options
fs_active_plugins

Browser metrics Passed 4 tests

Checking browser requirements for AADMY - Add Auto Date Month Year Into Posts
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲7414.67 ▲0.331.88 ▲0.1232.77 ▼13.73
Dashboard /wp-admin2,219 ▲425.52 ▼0.1296.87 ▼3.7543.77 ▼1.99
Posts /wp-admin/edit.php2,122 ▲222.03 ▲0.0842.19 ▲6.1437.47 ▲5.29
Add New Post /wp-admin/post-new.php1,534 ▲822.96 ▲0.01591.93 ▼20.1645.35 ▼19.33
Media Library /wp-admin/upload.php1,418 ▲184.25 ▲0.0799.61 ▲4.2545.28 ▲3.67
Freemius Debug [v.2.5.6] /wp-admin/admin.php?page=freemius1,0731.6523.5929.34
AADMY Shortcodes /wp-admin/options-general.php?page=aadmy-settings9851.6426.3462.16

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • fs_accounts
    • widget_theysaidso_widget
    • fs_active_plugins
    • can_compress_scripts
    • widget_recent-comments
    • fs_debug_mode
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/auto-date-year-month/aadmy-shortcodes/aadmy-offsets.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/auto-date-year-month/aadmy-includes/aadmy-welcome-message.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/auto-date-year-month/aadmy-shortcodes/aadmy-other-functions.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/auto-date-year-month/aadmy-includes/aadmy-menu.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (List of shortcodes), #2 (Table of shortcodes), #3 (Using of shortcodes), #4 (output of shortcodes)
  • Tags: You are using too many tags: 12 tag instead of maximum 10
Please take inspiration from this readme.txt

auto-date-year-month/auto-date-year-month.php Passed 13 tests

The principal PHP file in "AADMY - Add Auto Date Month Year Into Posts" v. 1.1.4 is loaded by WordPress automatically on each request
130 characters long description:
This WordPress plugin allows you to dynamically add current dates, years, months, and other time-related elements to your content.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin33,734 lines of code in 142 files:
LanguageFilesBlank linesComment linesLines of code
PHP1248,04317,21833,185
Markdown1680214
JavaScript33459194
CSS14262141

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
The following items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,079)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity93.19
▷ Minimum class complexity1.00
▷ Maximum class complexity3,079.00
Average method complexity4.60
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes48
▷ Abstract classes24.17%
▷ Concrete classes4695.83%
▷ Final classes00.00%
Methods1,259
▷ Static methods19715.65%
▷ Public methods87069.10%
▷ Protected methods171.35%
▷ Private methods37229.55%
Functions123
▷ Named functions123100.00%
▷ Anonymous functions00.00%
Constants146
▷ Global constants9967.81%
▷ Class constants4732.19%
▷ Public constants47100.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%