84% folded-pages

Code Review | Folded Pages

WordPress plugin Folded Pages scored84%from 54 tests.

About plugin

  • Plugin page: folded-pages
  • Plugin version: 2.1.7
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.0
  • WordPress version: 6.3.1
  • First release: Oct 4, 2022
  • Latest release: Oct 11, 2022
  • Number of updates: 11
  • Update frequency: every 1.7 days
  • Top authors: earthman100 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /273 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼1.74ms] Passed 4 tests

A check of server-side resources used by Folded Pages
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0737.71 ▼6.23
Dashboard /wp-admin3.37 ▲0.0752.64 ▼0.50
Posts /wp-admin/edit.php3.42 ▲0.0651.32 ▲3.41
Add New Post /wp-admin/post-new.php5.95 ▲0.0688.25 ▲0.61
Media Library /wp-admin/upload.php3.29 ▲0.0634.73 ▼0.85

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Folded Pages
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.35 ▼0.241.98 ▼0.1944.92 ▲1.81
Dashboard /wp-admin2,192 ▲185.54 ▼0.0498.95 ▼0.9941.90 ▼1.76
Posts /wp-admin/edit.php2,103 ▲31.99 ▼0.0134.60 ▼5.5532.72 ▼4.06
Add New Post /wp-admin/post-new.php1,526 ▼1123.27 ▲5.20664.77 ▲51.2152.01 ▼12.96
Media Library /wp-admin/upload.php1,400 ▼04.19 ▼0.0096.18 ▼5.2041.46 ▼5.40

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • 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
Even though everything seems fine, this is not an exhaustive test

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× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function EMMEDIA\\add_action() in wp-content/plugins/folded-pages/folded-pages.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: page-management, wp-admin

folded-pages/folded-pages.php Passed 13 tests

The main file in "Folded Pages" v. 2.1.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
103 characters long description:
A lightweight WordPress plugin to view hierarchical pages more efficiently in the WP-Admin page listing

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
Good job! No executable or dangerous file extensions detected365 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP23894248
Markdown132092
XML1165325

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity68.00
▷ Minimum class complexity68.00
▷ Maximum class complexity68.00
Average method complexity7.70
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.49MB with 0.24MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png147.78KB149.61KB0.00%
assets/icon-256x256.png14.24KB5.79KB▼ 59.31%
assets/screenshot-2.png211.92KB69.53KB▼ 67.19%
assets/screenshot-1.png131.49KB44.47KB▼ 66.18%