79% simplest-under-construction

Code Review | Simplest Under Construction

WordPress plugin Simplest Under Construction scored79%from 54 tests.

About plugin

  • Plugin page: simplest-under-co...
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5
  • WordPress version: 6.3.1
  • First release: Oct 5, 2018
  • Latest release: Aug 1, 2020
  • Number of updates: 4
  • Update frequency: every 166.5 days
  • Top authors: bilaltas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /826 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.26ms] Passed 4 tests

Analyzing server-side resources used by Simplest Under Construction
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.66 ▼5.55
Dashboard /wp-admin3.34 ▼0.0153.95 ▼12.08
Posts /wp-admin/edit.php3.39 ▲0.0357.33 ▲8.24
Add New Post /wp-admin/post-new.php5.92 ▲0.03103.36 ▲2.55
Media Library /wp-admin/upload.php3.26 ▲0.0341.00 ▲6.03
Under Construction /wp-admin/options-general.php?page=simplest-under-construction3.2335.34

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Simplest Under Construction: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.25 ▼0.101.94 ▼0.2341.07 ▲1.29
Dashboard /wp-admin2,202 ▲225.64 ▼0.0190.70 ▼0.6938.12 ▼1.25
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0639.22 ▲0.2535.80 ▼3.44
Add New Post /wp-admin/post-new.php1,530 ▲423.28 ▲0.23688.23 ▼14.2053.73 ▲1.28
Media Library /wp-admin/upload.php1,401 ▲14.39 ▲0.22105.40 ▼1.6548.80 ▲1.98
Under Construction /wp-admin/options-general.php?page=simplest-under-construction9221.6531.0626.85

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 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
The following issues need your attention
  • 4× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/simplest-under-construction/simplest-under-construction.php
    • > /wp-content/plugins/simplest-under-construction/suc_files/under_construction.php
    • > /wp-content/plugins/simplest-under-construction/suc_files/under_construction_admin-public_functions.php
    • > /wp-content/plugins/simplest-under-construction/suc_files/under_construction_public.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bloginfo() in wp-content/plugins/simplest-under-construction/suc_files/under_construction_default_page.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: under construction, coming soon, maintenance mode, maintenance

simplest-under-construction/simplest-under-construction.php Passed 13 tests

"Simplest Under Construction" version 0.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
110 characters long description:
This is the simplest plugin to restrict a Wordpress site to the public. You can allow them by IP or user role.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected343 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP615063340
Markdown1103

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.67
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
dev_icon.png1.65KB0.89KB▼ 46.30%