84% fix-duplicates

Code Review | Fix Duplicates

WordPress plugin Fix Duplicates scored84%from 54 tests.

About plugin

  • Plugin page: fix-duplicates
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.6.1
  • WordPress version: 6.3.1
  • First release: Mar 5, 2014
  • Latest release: Jun 29, 2017
  • Number of updates: 18
  • Update frequency: every 79.2 days
  • Top authors: StephenCronin (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

1,000+ active /50,628 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼8.51ms] Passed 4 tests

This is a short check of server-side resources used by Fix Duplicates
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0040.92 ▼0.79
Dashboard /wp-admin3.46 ▲0.0749.53 ▼19.01
Posts /wp-admin/edit.php3.57 ▲0.1750.65 ▼1.26
Add New Post /wp-admin/post-new.php6.04 ▲0.1191.74 ▼12.96
Media Library /wp-admin/upload.php3.38 ▲0.1136.00 ▲0.91

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
fix_duplicates_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Fix Duplicates
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4314.25 ▼0.101.68 ▼0.0540.25 ▼1.57
Dashboard /wp-admin2,213 ▲365.56 ▼0.0986.77 ▼2.8467.21 ▲25.24
Posts /wp-admin/edit.php2,121 ▲211.96 ▼0.0037.08 ▲2.2931.96 ▼5.73
Add New Post /wp-admin/post-new.php1,556 ▲2823.15 ▲0.04651.32 ▼33.24161.41 ▲97.91
Media Library /wp-admin/upload.php1,418 ▲184.16 ▼0.0398.99 ▼8.4579.75 ▲32.65

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • fix_duplicates_options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fix-duplicates/fix-duplicates.php:50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fix-duplicates/fix-duplicates-admin.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === fix-duplicates === )
You can take inspiration from this readme.txt

fix-duplicates/fix-duplicates.php 92% from 13 tests

The principal PHP file in "Fix Duplicates" v. 1.0.4 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 201 characters long)

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
There were no executable files found in this plugin1,000 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2142126639
CSS151208
JavaScript11037153

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/fix-duplicates-icon-32.png0.90KB0.89KB▼ 1.63%
images/list.png1.08KB0.99KB▼ 7.97%
images/fix-duplicates-icon-16.png0.42KB0.29KB▼ 31.03%