89% master-paper-collapse-toggle

Code Review | Master Paper Collapse Toggle

WordPress plugin Master Paper Collapse Toggle scored89%from 54 tests.

About plugin

  • Plugin page: master-paper-coll...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.6
  • WordPress version: 6.3.1
  • First release: Oct 21, 2014
  • Latest release: Nov 5, 2016
  • Number of updates: 5
  • Update frequency: every 149.4 days
  • Top authors: maurolopes (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,370 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼11.77ms] Passed 4 tests

Analyzing server-side resources used by Master Paper Collapse Toggle
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0044.49 ▲2.10
Dashboard /wp-admin3.31 ▼0.0449.90 ▼14.22
Posts /wp-admin/edit.php3.36 ▲0.0048.29 ▼5.70
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.08 ▼25.48
Media Library /wp-admin/upload.php3.23 ▲0.0033.08 ▼1.66

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Master Paper Collapse Toggle
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.16 ▼0.451.74 ▲0.0447.37 ▼0.84
Dashboard /wp-admin2,195 ▲155.54 ▼0.0788.13 ▼2.7342.28 ▲1.50
Posts /wp-admin/edit.php2,103 ▲31.96 ▼0.0135.36 ▼5.3336.50 ▲0.85
Add New Post /wp-admin/post-new.php1,526 ▼223.20 ▲0.17596.07 ▼95.9958.85 ▼2.21
Media Library /wp-admin/upload.php1,397 ▼04.19 ▲0.01100.05 ▼2.7445.31 ▼1.14

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

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

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: master, toggle, collapse, paper, accordion

master-paper-collapse-toggle/master-paper-collapse-togle.php 85% from 13 tests

The main PHP script in "Master Paper Collapse Toggle" version 1.1 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("master-paper-collapse-toggle.php" instead of "master-paper-collapse-togle.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 193 characters long)

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 plugin136 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS22667
JavaScript22035
PHP1244034

PHP code Passed 2 tests

A short 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.13
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin