77% maintenance-and-noindex-nofollow

Code Review | LionScripts: Site Maintenance & Noindex Nofollow Plugin

WordPress plugin LionScripts: Site Maintenance & Noindex Nofollow Plugin scored77%from 54 tests.

About plugin

  • Plugin page: maintenance-and-n...
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-4.7.5
  • WordPress version: 6.3.1
  • First release: Sep 9, 2013
  • Latest release: May 25, 2017
  • Number of updates: 64
  • Update frequency: every 21.2 days
  • Top authors: LionScripts.com (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,426 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
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼5.09ms] Passed 4 tests

This is a short check of server-side resources used by LionScripts: Site Maintenance & Noindex Nofollow Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1042.81 ▼0.95
Dashboard /wp-admin3.40 ▲0.0545.66 ▼15.22
Posts /wp-admin/edit.php3.52 ▲0.1647.06 ▲0.33
Add New Post /wp-admin/post-new.php5.98 ▲0.0993.56 ▼4.52
Media Library /wp-admin/upload.php3.32 ▲0.0935.74 ▲2.24
Site Maintenance /wp-admin/admin.php?page=lionscripts-maintenance-and-noindex-nofollow3.2932.36
Dashboard /wp-admin/admin.php?page=lionscripts-dashboard3.2933.32

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for LionScripts: Site Maintenance & Noindex Nofollow Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲9113.62 ▼0.931.70 ▼0.3143.87 ▼7.39
Dashboard /wp-admin2,235 ▲475.84 ▼0.0595.84 ▼24.8779.68 ▲33.98
Posts /wp-admin/edit.php2,112 ▲231.99 ▼0.0238.38 ▲0.4936.22 ▼0.70
Add New Post /wp-admin/post-new.php1,540 ▲723.31 ▼0.04766.61 ▲130.8351.52 ▼8.01
Media Library /wp-admin/upload.php1,417 ▲324.19 ▼0.03101.93 ▲1.7969.78 ▲26.49
Site Maintenance /wp-admin/admin.php?page=lionscripts-maintenance-and-noindex-nofollow9282.0530.9235.98
Dashboard /wp-admin/admin.php?page=lionscripts-dashboard9422.0925.3830.92

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/maintenance-and-noindex-nofollow/index.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_admin_url() in wp-content/plugins/maintenance-and-noindex-nofollow/lib/lionscripts_plg_mnn.class.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_admin_url() in wp-content/plugins/maintenance-and-noindex-nofollow/lib/lionscripts_plg_mnn.class.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'lionscripts_plg' not found in wp-content/plugins/maintenance-and-noindex-nofollow/lib/lionscripts_plg_mnn.class.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 19 tag instead of maximum 10
  • Screenshots: Screenshot #1 (Main Page (Options Page)) image required
Please take inspiration from this readme.txt

maintenance-and-noindex-nofollow/maintenance-noindex-nofollow.php 85% from 13 tests

The main PHP file in "LionScripts: Site Maintenance & Noindex Nofollow Plugin" ver. 2.1 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 302 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("maintenance-and-noindex-nofollow.php" instead of "maintenance-noindex-nofollow.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 detected645 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP57321424
CSS1342221

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity13.00
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
10 PNG files occupy 0.40MB with 0.24MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png31.38KB15.33KB▼ 51.14%
assets/images/icon-16.png3.64KB0.81KB▼ 77.71%
assets/images/ls-icon-16.png1.14KB0.63KB▼ 44.34%
assets/images/pro.png59.35KB24.43KB▼ 58.84%
assets/images/socialize2.png154.36KB58.84KB▼ 61.88%