94% preserve-mainwp

Code Review | Preserve MainWP Connection

WordPress plugin Preserve MainWP Connection scored 94% from 54 tests.

About plugin

  • Plugin page: preserve-mainwp
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3.2
  • WordPress version: 5.8.1
  • First release: May 10, 2020
  • Latest release: May 11, 2020
  • Number of updates: 3
  • Update frequency: every 4.0 days
  • Top authors: jasonh1234 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 502 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼143.52ms] Passed 4 tests

Server-side resources used by Preserve MainWP Connection
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1235.01 ▲10.37
Dashboard /wp-admin3.07 ▲0.0145.78 ▲2.55
Posts /wp-admin/edit.php3.12 ▲0.0143.58 ▼0.74
Add New Post /wp-admin/post-new.php5.43 ▼0.0091.10 ▼567.07
Media Library /wp-admin/upload.php3.01 ▼0.0030.80 ▼8.82

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Preserve MainWP Connection: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,689 ▲9315.97 ▲0.317.68 ▼2.0547.34 ▲0.96
Dashboard /wp-admin2,970 ▲395.95 ▲0.00143.91 ▲2.13108.17 ▼1.80
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0270.06 ▲9.7380.71 ▲0.73
Add New Post /wp-admin/post-new.php1,498 ▼17418.87 ▲0.04378.07 ▲12.79109.47 ▼1.40
Media Library /wp-admin/upload.php1,810 ▲35.04 ▲0.01150.47 ▼1.95120.85 ▼4.66

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/preserve-mainwp/preserve-mainwp.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === preserve-mainwp === )
You can take inspiration from this readme.txt

preserve-mainwp/preserve-mainwp.php 92% from 13 tests

The entry point to "Preserve MainWP Connection" version 1.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 151 characters long)

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 detected10 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP161910

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.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
There are no PNG files in this plugin