90% staging-prevent-indexing

Code Review | Prevent Indexing on Non-Live Sites

WordPress plugin Prevent Indexing on Non-Live Sites scored90%from 54 tests.

About plugin

  • Plugin page: staging-prevent-i...
  • Plugin version: 1.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2
  • WordPress version: 6.3.1
  • First release: Nov 28, 2023
  • Latest release: Nov 28, 2023
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: tex0gen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /22 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
This plugin's installer ran successfully

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

A check of server-side resources used by Prevent Indexing on Non-Live Sites
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.11 ▼6.87
Dashboard /wp-admin3.33 ▲0.0357.15 ▲7.80
Posts /wp-admin/edit.php3.38 ▲0.0350.25 ▼1.20
Add New Post /wp-admin/post-new.php5.91 ▲0.0394.97 ▼5.15
Media Library /wp-admin/upload.php3.26 ▲0.0334.25 ▼0.48
Prevent Indexing /wp-admin/options-general.php?page=pi_prevent-indexing-settings3.2230.91

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Prevent Indexing on Non-Live Sites
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲4914.35 ▼0.411.82 ▲0.0940.81 ▼2.41
Dashboard /wp-admin2,213 ▲335.63 ▼0.0292.97 ▲4.4145.98 ▲7.79
Posts /wp-admin/edit.php2,122 ▲222.03 ▲0.0940.85 ▼0.2836.87 ▼0.88
Add New Post /wp-admin/post-new.php1,541 ▲1423.38 ▲0.03632.23 ▼31.5348.33 ▼9.79
Media Library /wp-admin/upload.php1,421 ▲184.15 ▼0.03100.07 ▼0.1441.50 ▼1.81
Prevent Indexing /wp-admin/options-general.php?page=pi_prevent-indexing-settings8152.0227.5830.36

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 does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Looking good! No server-side errors or output on direct access of PHP files

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)
Everything seems fine, but this is not an exhaustive test

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
5 plugin tags: staging, prevent, seo, indexing, development

staging-prevent-indexing/staging-prevent-indexing.php Passed 13 tests

The principal PHP file in "Prevent Indexing on Non-Live Sites" v. 1.0 is loaded by WordPress automatically on each request
95 characters long description:
Automatically switches OFF the indexing option if the URL does not match the site URL provided.

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
Everything looks great! No dangerous files found in this plugin101 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12016101

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.11
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.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 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
No PNG files were detected