83% pousadinhas-search-widget

Code Review | Pousadinhas Search Widget

WordPress plugin Pousadinhas Search Widget scored83%from 54 tests.

About plugin

  • Plugin page: pousadinhas-searc...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.3
  • WordPress version: 6.3.1
  • First release: Sep 13, 2013
  • Latest release: Sep 21, 2015
  • Number of updates: 14
  • Update frequency: every 52.7 days
  • Top authors: pousadinhas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,219 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.71ms] Passed 4 tests

Analyzing server-side resources used by Pousadinhas Search Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.44 ▲0.57
Dashboard /wp-admin3.32 ▲0.0149.78 ▼0.51
Posts /wp-admin/edit.php3.43 ▲0.0849.57 ▼4.51
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.36 ▼14.11
Media Library /wp-admin/upload.php3.24 ▲0.0137.44 ▲0.31

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_pousadinhas_search_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Pousadinhas Search Widget: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.21 ▼1.182.07 ▲0.2236.96 ▼1.52
Dashboard /wp-admin2,206 ▲155.82 ▲0.9197.67 ▼22.8840.05 ▼9.31
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0035.61 ▼6.0331.37 ▼6.97
Add New Post /wp-admin/post-new.php1,533 ▲1422.95 ▼0.42621.42 ▼46.3952.69 ▼12.45
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.06100.55 ▼9.9542.05 ▼4.90

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_pousadinhas_search_widget
    • theysaidso_admin_options

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)
Even though everything seems fine, this is not 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
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/pousadinhas-search-widget/pousadinhas-search-widget.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • License uri: Please fix this invalid url: ""
  • Donate link: Please fix this invalid url: ""
The official readme.txt is a good inspiration

pousadinhas-search-widget/pousadinhas-search-widget.php 77% from 13 tests

"Pousadinhas Search Widget" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Domain Path: The domain path should be prefixed with a forward slash character ("/languages")
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 146 characters long)

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 plugin171 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP12658115
PO File2121256

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity10.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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin