84% website-compare

Code Review | WordPress Plugins Compare Diff

WordPress plugin WordPress Plugins Compare Diff scored84%from 54 tests.

About plugin

  • Plugin page: website-compare
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.9.2
  • WordPress version: 6.3.1
  • First release: Apr 27, 2022
  • Latest release: Apr 27, 2022
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: lehelm (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,280 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.16MB] [CPU: ▼2.67ms] Passed 4 tests

A check of server-side resources used by WordPress Plugins Compare Diff
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1539.89 ▼0.27
Dashboard /wp-admin3.53 ▲0.1846.24 ▼9.81
Posts /wp-admin/edit.php3.58 ▲0.2248.45 ▼1.62
Add New Post /wp-admin/post-new.php6.04 ▲0.1689.25 ▲1.01
Media Library /wp-admin/upload.php3.38 ▲0.1635.71 ▲1.87
Website Compare /wp-admin/options-general.php?page=plugins_compare_options3.3533.82

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 26 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
plgncmpr_general_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
plgncmpr_settings_manual_options

Browser metrics Passed 4 tests

Checking browser requirements for WordPress Plugins Compare Diff
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.22 ▼1.451.67 ▲0.0343.51 ▲0.23
Dashboard /wp-admin2,212 ▲605.88 ▲0.28105.82 ▲7.3441.81 ▲3.02
Posts /wp-admin/edit.php2,092 ▲32.03 ▼0.0239.77 ▲1.0834.55 ▼3.41
Add New Post /wp-admin/post-new.php1,538 ▲1522.97 ▼0.08640.73 ▼27.7155.99 ▼1.00
Media Library /wp-admin/upload.php1,394 ▲64.26 ▲0.1596.37 ▼0.8942.07 ▲0.75
Website Compare /wp-admin/options-general.php?page=plugins_compare_options8952.0037.6328.18

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 8 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • plgncmpr_general_options
    • db_upgraded
    • can_compress_scripts
    • plgncmpr_settings_manual_options
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 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
Please fix the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/website-compare/public/partials/website-compare-public-display.php
    • > /wp-content/plugins/website-compare/admin/partials/website-compare-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: comments, spam

website-compare/website-compare.php Passed 13 tests

The main file in "WordPress Plugins Compare Diff" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
90 characters long description:
Allows you to easily compare plugins between two websites that have this plugin installed.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected932 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP16338791871
CSS2182152
JavaScript28549

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity10.00
▷ Minimum class complexity1.00
▷ Maximum class complexity49.00
Average method complexity2.24
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods80
▷ Static methods22.50%
▷ Public methods7593.75%
▷ Protected methods00.00%
▷ Private methods56.25%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin