84% diff-check

Code Review | DiffCheck - Compare two text files

WordPress plugin DiffCheck - Compare two text files scored84%from 54 tests.

About plugin

  • Plugin page: diff-check
  • Plugin version: 1.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Mar 11, 2023
  • Latest release: Jun 20, 2023
  • Number of updates: 11
  • Update frequency: every 9.2 days
  • Top authors: pluginsclub (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /203 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
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.66ms] Passed 4 tests

An overview of server-side resources used by DiffCheck - Compare two text files
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.42 ▲2.43
Dashboard /wp-admin3.33 ▼0.0244.26 ▼10.02
Posts /wp-admin/edit.php3.38 ▲0.0243.41 ▼7.57
Add New Post /wp-admin/post-new.php5.91 ▲0.0387.62 ▼11.39
Media Library /wp-admin/upload.php3.25 ▲0.0232.10 ▲2.34

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

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

Browser metrics Passed 4 tests

DiffCheck - Compare two text files: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,981 ▲21021.93 ▲7.58155.67 ▲153.4162.72 ▲19.42
Dashboard /wp-admin2,206 ▲185.82 ▲0.7793.21 ▼14.3140.04 ▲0.88
Posts /wp-admin/edit.php2,089 ▼01.98 ▼0.0336.27 ▼11.4334.77 ▼16.85
Add New Post /wp-admin/post-new.php6,184 ▲4,65618.90 ▲0.58872.83 ▲267.1837.22 ▼12.89
Media Library /wp-admin/upload.php1,388 ▼04.22 ▲0.0394.74 ▼8.6344.00 ▲2.06

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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 items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/diff-check/diff_check.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/diff-check/includes/gutenberg-block.php:48
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/diff-check/includes/shortcodes.php:39

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Screenshots: These screenshots need descriptions #1, #2 in diff-check/assets to your readme.txt
The official readme.txt is a good inspiration

diff-check/diff_check.php 92% from 13 tests

"DiffCheck - Compare two text files" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("diff-check.php" instead of "diff_check.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected231 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP32921117
JavaScript22080
CSS37134

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
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%
Functions4
▷ Named functions4100.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