78% dexonline-searchbox

Code Review | Dexonline Searchbox

WordPress plugin Dexonline Searchbox scored 78% from 54 tests.

About plugin

  • Plugin page: dexonline-searchbox
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3
  • WordPress version: 6.3.1
  • First release: Sep 17, 2015
  • Latest release: Sep 23, 2015
  • Number of updates: 3
  • Update frequency: every 2.0 days
  • Top authors: grigoroiualex (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 797 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.07MB] [CPU: ▼1.61ms] Passed 4 tests

An overview of server-side resources used by Dexonline Searchbox
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0741.80 ▲0.72
Dashboard /wp-admin3.37 ▲0.0644.67 ▼4.09
Posts /wp-admin/edit.php3.48 ▲0.1248.05 ▼0.78
Add New Post /wp-admin/post-new.php5.97 ▲0.08100.59 ▼2.27
Media Library /wp-admin/upload.php3.29 ▲0.0633.34 ▲2.03

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 29 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_dexonline_searchbox_widget
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Dexonline Searchbox
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲15213.62 ▼0.696.03 ▲4.1941.51 ▼4.01
Dashboard /wp-admin2,204 ▲165.83 ▲0.73104.43 ▼0.8539.81 ▼1.82
Posts /wp-admin/edit.php2,096 ▲42.00 ▼0.0538.22 ▼2.8133.73 ▼1.69
Add New Post /wp-admin/post-new.php1,518 ▼1523.34 ▲0.02626.21 ▼24.0157.53 ▼0.40
Media Library /wp-admin/upload.php1,392 ▲44.19 ▼0.04101.97 ▲5.3241.49 ▼2.06

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_dexonline_searchbox_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 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 0% 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 fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/dexonline-searchbox/admin/partials/dexonline-admin-admin-display.php
    • > /wp-content/plugins/dexonline-searchbox/public/partials/dexonline-searchbox-public-display.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/dexonline-searchbox/includes/class-dexonline-searchbox-widget.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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
These attributes need your attention:
  • Tags: You are using too many tags: 14 tag instead of maximum 10
  • Screenshots: A description for screenshot #2 is missing in dexonline-searchbox/assets to your readme.txt
Please take inspiration from this readme.txt

dexonline-searchbox/dexonline-searchbox.php Passed 13 tests

The main PHP script in "Dexonline Searchbox" version 1.0 is automatically included on every request by WordPress
66 characters long description:
Adds a searchbox to help easily search romanian words definitions.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected303 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP13133595207
PO File391870
JavaScript262719
CSS2287

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.06
Average class complexity1.38
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.10
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods30
▷ Static methods26.67%
▷ Public methods2583.33%
▷ Protected methods00.00%
▷ Private methods516.67%
Functions3
▷ Named functions3100.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