83% domainers-delight-search-widget

Code Review | Domainers Delight - Search Widget

WordPress plugin Domainers Delight - Search Widget scored 83% from 54 tests.

About plugin

  • Plugin page: domainers-delight...
  • Plugin version: 0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9.2
  • WordPress version: 5.8.1
  • First release: Jan 30, 2018
  • Latest release: Mar 11, 2018
  • Number of updates: 5
  • Update frequency: every 8.0 days
  • Top authors: maf1981 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 416 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼140.32ms] Passed 4 tests

This is a short check of server-side resources used by Domainers Delight - Search Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.93 ▲0.2034.26 ▲12.82
Dashboard /wp-admin3.14 ▲0.0836.49 ▼9.30
Posts /wp-admin/edit.php3.19 ▲0.0848.22 ▲4.72
Add New Post /wp-admin/post-new.php5.50 ▲0.0692.25 ▼560.19
Media Library /wp-admin/upload.php3.09 ▲0.0834.90 ▲3.50

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 1 new option
New WordPress options
widget_domainersdelight_search

Browser metrics Passed 4 tests

Domainers Delight - Search Widget: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,683 ▲8715.82 ▲0.1812.04 ▲3.8248.40 ▼2.11
Dashboard /wp-admin2,967 ▲335.97 ▲0.01134.27 ▼14.46112.92 ▲0.41
Posts /wp-admin/edit.php2,739 ▼02.72 ▼0.0162.05 ▼2.2490.70 ▲1.18
Add New Post /wp-admin/post-new.php3,693 ▲2,19315.16 ▼3.25415.08 ▲57.01108.71 ▼1.28
Media Library /wp-admin/upload.php1,807 ▼05.02 ▲0.00147.38 ▲1.53124.20 ▲0.92

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 1 option in the database
    • widget_domainersdelight_search

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/domainers-delight-search-widget/domainers-delight-search.php:115

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === domainers-delight-search-widget === )
You can take inspiration from this readme.txt

domainers-delight-search-widget/domainers-delight-search.php 85% from 13 tests

"Domainers Delight - Search Widget" version 0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("domainers-delight-search-widget.php" instead of "domainers-delight-search.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin411 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP14066266
PO File1457773
JavaScript155240
CSS11232

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity5.25
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected