89% mighty-pros-cons

Code Review | Mighty Pros & Cons

WordPress plugin Mighty Pros & Cons scored89%from 54 tests.

About plugin

  • Plugin page: mighty-pros-cons
  • Plugin version: 1.2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: May 15, 2019
  • Latest release: Oct 1, 2023
  • Number of updates: 28
  • Update frequency: every 57.1 days
  • Top authors: mightythemes1 (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /7,693 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
Install script ran successfully

Server metrics [RAM: ▼0.26MB] [CPU: ▼16.88ms] Passed 4 tests

Server-side resources used by Mighty Pros & Cons
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.62 ▼2.99
Dashboard /wp-admin3.33 ▲0.0247.91 ▼5.79
Posts /wp-admin/edit.php3.38 ▲0.0250.31 ▲4.04
Add New Post /wp-admin/post-new.php4.82 ▼1.0751.30 ▼62.77
Media Library /wp-admin/upload.php3.25 ▲0.0243.00 ▲6.25

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Mighty Pros & Cons: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲6414.73 ▲0.341.68 ▼0.0340.90 ▼0.71
Dashboard /wp-admin2,200 ▲145.81 ▼0.12100.55 ▼6.3740.79 ▼3.13
Posts /wp-admin/edit.php2,092 ▼02.01 ▲0.0040.09 ▲2.1035.21 ▲0.46
Add New Post /wp-admin/post-new.php6,357 ▲4,82228.16 ▲5.20942.63 ▲263.4357.03 ▲7.66
Media Library /wp-admin/upload.php1,388 ▲94.15 ▼0.0495.77 ▼2.8543.39 ▼3.69

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (Backend screenshot.), #2 (Style 1.), #3 (Style 2.), #4 (Style 3.)
  • Plugin Name: You should set the name of your plugin on the first line ( === mighty-pros-cons === )
The official readme.txt is a good inspiration

mighty-pros-cons/pros-cons.php 92% from 13 tests

This is the main PHP file of "Mighty Pros & Cons" version 1.2.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("mighty-pros-cons.php" instead of "pros-cons.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected10,741 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
JSON4007,511
JavaScript584862,224
Sass34412482
CSS2412354
Markdown133090
PHP2124176
SVG4004

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions3
▷ Named functions3100.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
4 PNG files occupy 0.13MB with 0.07MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
Screenshot-4.png16.24KB7.32KB▼ 54.90%
Screenshot-2.png24.46KB10.99KB▼ 55.09%
Screenshot-3.png27.80KB11.14KB▼ 59.93%
Screenshot-1.png65.23KB26.48KB▼ 59.41%