84% aperture

Code Review | Aperture

WordPress plugin Aperture scored 84% from 54 tests.

About plugin

  • Plugin page: aperture
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9.8
  • WordPress version: 6.3.1
  • First release: Aug 11, 2018
  • Latest release: Aug 21, 2018
  • Number of updates: 9
  • Update frequency: every 1.7 days
  • Top authors: aaronpk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,142 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.16ms] Passed 4 tests

Analyzing server-side resources used by Aperture
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.30 ▼3.17
Dashboard /wp-admin3.31 ▲0.0050.69 ▲2.67
Posts /wp-admin/edit.php3.36 ▲0.0048.17 ▲0.03
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.86 ▼6.92
Media Library /wp-admin/upload.php3.23 ▲0.0035.41 ▲1.44

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Aperture
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.12 ▼1.231.73 ▲0.1044.59 ▼2.27
Dashboard /wp-admin2,209 ▲214.87 ▼0.0198.71 ▼2.2841.09 ▲0.54
Posts /wp-admin/edit.php2,089 ▼32.02 ▼0.0338.69 ▼0.4034.59 ▼1.33
Add New Post /wp-admin/post-new.php1,535 ▲122.97 ▼0.13653.68 ▼46.3842.29 ▼13.44
Media Library /wp-admin/upload.php1,391 ▲64.23 ▲0.08108.20 ▲10.5347.00 ▲0.76

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/aperture/aperture.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Screenshots: Screenshot #1 (aperture-account-activated.png) image missing
Please take inspiration from this readme.txt

aperture/aperture.php Passed 13 tests

The primary PHP file in "Aperture" version 1.0.2 is used by WordPress to initiate all plugin functionality
97 characters long description:
This plugin adds a Microsub endpoint to your WordPress site by using the hosted Aperture service.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin117 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1261997
XML12020

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/aperture-account-activated.png22.94KB7.24KB▼ 68.45%