74% under-construction-for-specific-pages

Code Review | Under Construction page display for certain page is in under maintenance.

WordPress plugin Under Construction page display for certain page is in under maintenance. scored74%from 54 tests.

About plugin

  • Plugin page: under-constructio...
  • Plugin version: 2.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.1
  • WordPress version: 6.3.1
  • First release: Jan 27, 2023
  • Latest release: Feb 9, 2023
  • Number of updates: 8
  • Update frequency: every 1.9 days
  • Top authors: chiragjdsofttech (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /211 total downloads

Benchmarks

Plugin footprint 65% 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.90MB] [CPU: ▼37.42ms] Passed 4 tests

A check of server-side resources used by Under Construction page display for certain page is in under maintenance.
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0744.98 ▲7.07
Dashboard /wp-admin3.05 ▼0.2925.76 ▼39.32
Posts /wp-admin/edit.php3.05 ▼0.3025.65 ▼22.62
Add New Post /wp-admin/post-new.php3.05 ▼2.8326.26 ▼82.65
Media Library /wp-admin/upload.php3.05 ▼0.1831.23 ▼5.10

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 8 new files
Database: 1 new table, 6 new options
New tables
wp_underConstruct
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Under Construction page display for certain page is in under maintenance.
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7014.41 ▲0.051.96 ▲0.1142.81 ▼0.22
Dashboard /wp-admin2,222 ▲675.91 ▲0.2695.41 ▼10.9331.99 ▼12.69
Posts /wp-admin/edit.php2,127 ▲272.30 ▲0.1735.22 ▼5.2030.01 ▼5.18
Add New Post /wp-admin/post-new.php1,703 ▲17522.94 ▼0.21663.71 ▼69.7464.99 ▲4.82
Media Library /wp-admin/upload.php1,491 ▲944.43 ▲0.20116.50 ▲5.7246.82 ▼2.42

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

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)
Even though no errors were found, this is by no means an exhaustive test

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
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/under-construction-for-specific-pages/ajax_action.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/under-construction-for-specific-pages/under-constuction.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 96% from 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
6 plugin tags: maintenance mode, admin, under construction, unavailable, administration...

under-construction-for-specific-pages/under-constuction.php 92% from 13 tests

The entry point to "Under Construction page display for certain page is in under maintenance." version 2.0.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("under-construction-for-specific-pages.php" instead of "under-constuction.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected491 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP34547395
JavaScript281390
CSS2056

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions14
▷ Named functions14100.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
No PNG images were found in this plugin