89% simple-pagesposts-specific-maintenance-mode

Code Review | Simple Page Specific Maintenance Mode

WordPress plugin Simple Page Specific Maintenance Mode scored89%from 54 tests.

About plugin

  • Plugin page: simple-pagesposts...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.4
  • WordPress version: 6.3.1
  • First release: Apr 8, 2020
  • Latest release: Apr 8, 2020
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: devkmithi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /430 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Simple Page Specific Maintenance Mode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0543.94 ▼0.04
Dashboard /wp-admin3.38 ▲0.0750.05 ▼8.29
Posts /wp-admin/edit.php3.43 ▲0.0744.96 ▼3.83
Add New Post /wp-admin/post-new.php5.98 ▲0.0982.62 ▼7.62
Media Library /wp-admin/upload.php3.30 ▲0.0737.59 ▲3.75
Configure Maintenance /wp-admin/options-general.php?page=kmithi-maintenance-setting3.2937.95

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Simple Page Specific Maintenance Mode
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6213.29 ▼1.091.77 ▲0.0943.55 ▲0.52
Dashboard /wp-admin2,214 ▲265.04 ▼0.82112.79 ▼2.4241.88 ▲0.90
Posts /wp-admin/edit.php2,097 ▲82.24 ▲0.2232.60 ▼2.8834.11 ▼0.49
Add New Post /wp-admin/post-new.php1,521 ▲223.33 ▲0.16674.92 ▼8.3449.89 ▼9.97
Media Library /wp-admin/upload.php1,393 ▲54.36 ▲0.1695.51 ▼1.6042.63 ▼0.76
Configure Maintenance /wp-admin/options-general.php?page=kmithi-maintenance-setting9872.0136.2833.59

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Requires php: The plugin version is formatted incorrectly
  • Screenshots: Add an image for screenshot #1 (wp-admin setting page (settings -> Configure Maintenance).)
You can look at the official readme.txt

simple-pagesposts-specific-maintenance-mode/km-maintenance.php 92% from 13 tests

This is the main PHP file of "Simple Page Specific Maintenance Mode" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
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 ("simple-pagesposts-specific-maintenance-mode.php" instead of "km-maintenance.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected3,304 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript25483882,534
CSS211219516
PHP43173254

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity39.00
▷ Minimum class complexity39.00
▷ Maximum class complexity39.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods16.25%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.12MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/select2.png0.51KB0.99KB0.00%
assets/images/select2x2.png0.64KB0.77KB0.00%
assets/screenshot-1.png28.25KB16.43KB▼ 41.83%
assets/screenshot-3.png7.53KB3.43KB▼ 54.52%
assets/screenshot-2.png86.70KB43.42KB▼ 49.91%