93% adjustly-collapse

Code Review | Adjustly Collapse

WordPress plugin Adjustly Collapse scored 93% from 54 tests.

About plugin

  • Plugin page: adjustly-collapse
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Feb 21, 2012
  • Latest release: Feb 27, 2012
  • Number of updates: 12
  • Update frequency: every 0.6 days
  • Top authors: PSDCovers (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

300+ active / 6,882 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

This is a short check of server-side resources used by Adjustly Collapse
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0157.66 ▲3.43
Dashboard /wp-admin3.42 ▲0.0134.26 ▲0.53
Posts /wp-admin/edit.php3.65 ▲0.0138.51 ▼10.71
Add New Post /wp-admin/post-new.php6.89 ▼0.0897.91 ▼1,166.71
Media Library /wp-admin/upload.php3.30 ▼0.0025.19 ▼6.08

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Adjustly Collapse
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,899 ▲17716.67 ▲1.0911.57 ▲5.642.56 ▲0.29
Dashboard /wp-admin2,894 ▲396.18 ▲0.06118.89 ▼19.66146.48 ▼11.43
Posts /wp-admin/edit.php2,687 ▼73.37 ▲0.1463.83 ▲1.37142.84 ▲2.19
Add New Post /wp-admin/post-new.php1,663 ▼4816.62 ▼4.17422.76 ▼29.22155.90 ▼0.55
Media Library /wp-admin/upload.php1,692 ▼65.58 ▲0.04140.01 ▼1.96186.46 ▼0.22

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

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
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/adjustly-collapse/aj-collapse.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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: "Plugin Name" should be replaced with the name of your plugin on the first line ( === adjustly-collapse === )
  • Requires at least: Version not formatted correctly
The official readme.txt is a good inspiration

adjustly-collapse/aj-collapse.php 92% from 13 tests

The primary PHP file in "Adjustly Collapse" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("adjustly-collapse.php" instead of "aj-collapse.php")

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
Success! There were no dangerous files found in this plugin31 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP171119
JavaScript11129
CSS1003

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.10
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
No PNG images were found in this plugin