83% a-long-time-ago

Code Review | A Long Time Ago

WordPress plugin A Long Time Ago scored83%from 54 tests.

About plugin

  • Plugin page: a-long-time-ago
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8
  • WordPress version: 6.3.1
  • First release: Jan 23, 2014
  • Latest release: Jan 23, 2014
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: amielucha (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /1,701 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.00MB] [CPU: ▼9.51ms] Passed 4 tests

This is a short check of server-side resources used by A Long Time Ago
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.09 ▲1.49
Dashboard /wp-admin3.32 ▼0.0344.65 ▼14.17
Posts /wp-admin/edit.php3.37 ▲0.0142.24 ▼3.17
Add New Post /wp-admin/post-new.php5.90 ▲0.0176.80 ▼21.38
Media Library /wp-admin/upload.php3.24 ▲0.0134.36 ▲0.69

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for A Long Time Ago
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.09 ▼1.281.68 ▼0.0243.22 ▲1.21
Dashboard /wp-admin2,209 ▲184.86 ▼1.0395.47 ▼6.9741.53 ▼1.53
Posts /wp-admin/edit.php2,086 ▼62.16 ▲0.1635.20 ▼1.2234.72 ▲1.08
Add New Post /wp-admin/post-new.php1,542 ▲2818.68 ▲1.18599.61 ▼82.1256.17 ▲0.17
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.0393.31 ▼16.1741.24 ▼8.50

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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 take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/a-long-time-ago/long-time-ago.php

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)
No browser issues were 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
Attributes that need to be fixed:
  • Tags: You are using too many tags: 17 tag instead of maximum 10
The official readme.txt might help

a-long-time-ago/long-time-ago.php 85% from 13 tests

The primary PHP file in "A Long Time Ago" version 0.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("a-long-time-ago.php" instead of "long-time-ago.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 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
No dangerous file extensions were detected112 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1172958
PO File281054

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected