83% pagemagic-page-lists

Code Review | PageMagic - Page Lists

WordPress plugin PageMagic - Page Lists scored83%from 54 tests.

About plugin

  • Plugin page: pagemagic-page-lists
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.4
  • WordPress version: 6.3.1
  • First release: Jun 30, 2020
  • Latest release: Jul 1, 2020
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: meaghanbass (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

50+ active /797 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.05MB] [CPU: ▼3.91ms] Passed 4 tests

This is a short check of server-side resources used by PageMagic - Page Lists
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0639.58 ▼6.23
Dashboard /wp-admin3.37 ▲0.0255.50 ▼6.40
Posts /wp-admin/edit.php3.42 ▲0.0647.91 ▲1.42
Add New Post /wp-admin/post-new.php5.95 ▲0.07101.65 ▲8.60
Media Library /wp-admin/upload.php3.29 ▲0.0638.40 ▼4.41

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

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

Browser metrics Passed 4 tests

Checking browser requirements for PageMagic - Page Lists
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲514.35 ▲0.002.31 ▲0.0742.05 ▲1.50
Dashboard /wp-admin2,195 ▲215.54 ▲0.0193.52 ▲2.8943.49 ▲3.03
Posts /wp-admin/edit.php2,100 ▲32.03 ▼0.0036.42 ▼0.8735.14 ▼0.74
Add New Post /wp-admin/post-new.php1,526 ▼023.03 ▼0.57658.07 ▼41.1959.18 ▲5.79
Media Library /wp-admin/upload.php1,403 ▲34.21 ▲0.08103.32 ▼9.7746.25 ▲0.09

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pagemagic-page-lists/page-list.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% 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 require attention:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
The official readme.txt is a good inspiration

pagemagic-page-lists/page-list.php 92% from 13 tests

"PageMagic - Page Lists" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("pagemagic-page-lists.php" instead of "page-list.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin582 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP16439490
CSS14474
SVG10018

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 0.68MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png9.64KB9.67KB0.00%
assets/icon-128x128.png9.76KB5.26KB▼ 46.08%
assets/screenshot-4.png337.87KB363.14KB0.00%
assets/icon-256x256.png28.43KB13.48KB▼ 52.61%
assets/screenshot-2.png34.56KB36.91KB0.00%