89% primary-key-fixer

Code Review | Primary Key Fixer

WordPress plugin Primary Key Fixer scored89%from 54 tests.

About plugin

  • Plugin page: primary-key-fixer
  • Plugin version: 1.3
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.8
  • WordPress version: 6.3.1
  • First release: Aug 5, 2020
  • Latest release: Aug 29, 2021
  • Number of updates: 5
  • Update frequency: every 83.4 days
  • Top authors: omelhus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,159 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

Analyzing server-side resources used by Primary Key Fixer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.77 ▼2.31
Dashboard /wp-admin3.31 ▲0.0147.51 ▲0.25
Posts /wp-admin/edit.php3.36 ▲0.0041.43 ▼2.22
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.36 ▼3.62
Media Library /wp-admin/upload.php3.23 ▲0.0033.40 ▼2.14

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Primary Key Fixer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.77 ▲0.391.81 ▼0.0542.71 ▼2.34
Dashboard /wp-admin2,206 ▲185.90 ▲1.01110.47 ▼7.3443.57 ▼0.41
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0535.60 ▼0.6935.77 ▲2.47
Add New Post /wp-admin/post-new.php1,523 ▲323.17 ▲0.03645.95 ▼44.2268.36 ▲11.36
Media Library /wp-admin/upload.php1,388 ▼34.22 ▲0.0797.23 ▼17.2041.13 ▼8.92

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
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 a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 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
3 plugin tags: digital ocean, managed database, primary key

primary-key-fixer/pk-fixer.php 85% from 13 tests

"Primary Key Fixer" version 1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("primary-key-fixer.php" instead of "pk-fixer.php")
  • Description: The description should be shorter than 140 characters (currently 181 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected25 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP121018
Markdown1507

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.57
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 functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin