83% expanding-archives

Code Review | Expanding Archives

WordPress plugin Expanding Archives scored83%from 54 tests.

About plugin

  • Plugin page: expanding-archives
  • Plugin version: 2.0.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.0
  • WordPress version: 6.3.1
  • First release: Jun 18, 2015
  • Latest release: Jun 13, 2022
  • Number of updates: 31
  • Update frequency: every 82.3 days
  • Top authors: NoseGraze (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

2,000+ active /14,027 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.71ms] Passed 4 tests

Server-side resources used by Expanding Archives
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.46 ▼7.46
Dashboard /wp-admin3.32 ▲0.0246.91 ▼5.85
Posts /wp-admin/edit.php3.43 ▲0.0851.28 ▲1.84
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.96 ▼7.35
Media Library /wp-admin/upload.php3.24 ▲0.0237.33 ▲4.13

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 26 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_ng_expanding_archives
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Expanding Archives
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲9713.25 ▼1.135.05 ▲3.2146.12 ▲2.13
Dashboard /wp-admin2,203 ▲155.86 ▼0.03103.37 ▼14.2337.05 ▼11.20
Posts /wp-admin/edit.php2,089 ▼01.98 ▼0.0341.43 ▲6.4835.14 ▼0.06
Add New Post /wp-admin/post-new.php1,538 ▼523.34 ▲4.91674.71 ▲75.9363.74 ▲7.96
Media Library /wp-admin/upload.php1,391 ▲94.24 ▼0.11107.29 ▲5.1446.11 ▲4.23

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_ng_expanding_archives
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/expanding-archives/src/Widget.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Ashleyfae\\ExpandingArchives\\trailingslashit() in wp-content/plugins/expanding-archives/src/Plugin.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (12 tag instead of maximum 10)
Please take inspiration from this readme.txt

expanding-archives/expanding-archives.php 85% from 13 tests

"Expanding Archives" version 2.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Domain Path: Prefix the domain path with a forward slash character ("/lang")
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("lang")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin1,092 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP182476571,085
JSON1005
CSS1001
JavaScript1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity13.80
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.81
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods73
▷ Static methods1926.03%
▷ Public methods6487.67%
▷ Protected methods56.85%
▷ Private methods45.48%
Functions12
▷ Named functions433.33%
▷ Anonymous functions866.67%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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