83% crafty-clicks-postcode-lookup

Code Review | Crafty Clicks Postcode Lookup

WordPress plugin Crafty Clicks Postcode Lookup scored83%from 54 tests.

About plugin

  • Plugin page: crafty-clicks-pos...
  • Plugin version: 1.2.11
  • PHP version: 7.4.16
  • WordPress compatibility: 2.4-5.3
  • WordPress version: 6.3.1
  • First release: Jul 28, 2017
  • Latest release: Jan 13, 2020
  • Number of updates: 30
  • Update frequency: every 30.0 days
  • Top authors: craftyclicks (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /3,905 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
Installer ran successfully

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

Server-side resources used by Crafty Clicks Postcode Lookup
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.74 ▼13.11
Dashboard /wp-admin3.31 ▲0.0048.58 ▼7.06
Posts /wp-admin/edit.php3.36 ▲0.0048.96 ▼8.03
Add New Post /wp-admin/post-new.php5.89 ▲0.0096.49 ▼12.10
Media Library /wp-admin/upload.php3.23 ▲0.0033.72 ▼2.68

Server storage [IO: ▲0.10MB] [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
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Crafty Clicks Postcode Lookup
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.67 ▲0.391.79 ▼0.2445.81 ▲0.27
Dashboard /wp-admin2,198 ▲245.60 ▼0.0882.45 ▼17.9943.85 ▼0.50
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0540.91 ▼5.2735.67 ▼4.18
Add New Post /wp-admin/post-new.php1,526 ▼1021.08 ▲2.96596.58 ▼103.0171.33 ▼3.40
Media Library /wp-admin/upload.php1,403 ▲34.16 ▼0.07104.37 ▼6.3343.15 ▼5.62

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Integration' not found in wp-content/plugins/crafty-clicks-postcode-lookup/includes/class-wc-craftyclicks-postcode-lookup-integration.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/crafty-clicks-postcode-lookup/craftyclicks_postcode_lookup.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/crafty-clicks-postcode-lookup/wp/menu.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Tags: There are too many tags (17 tag instead of maximum 10)
You can look at the official readme.txt

crafty-clicks-postcode-lookup/craftyclicks_postcode_lookup.php 85% from 13 tests

This is the main PHP file of "Crafty Clicks Postcode Lookup" version 1.2.11, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("4.0" instead of "2.4")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("crafty-clicks-postcode-lookup.php" instead of "craftyclicks_postcode_lookup.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected774 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript34436524
PHP42665250

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity4.50
▷ Minimum class complexity2.00
▷ Maximum class complexity7.00
Average method complexity1.70
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin