10% italian-cap-city-search

Code Review | Wp Italian Cap/Cities Search

WordPress plugin Wp Italian Cap/Cities Search scored10%from 54 tests.

About plugin

  • Plugin page: italian-cap-city-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.11-4.6
  • WordPress version: 6.3.1
  • First release: Aug 31, 2016
  • Latest release: Sep 1, 2016
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: oprincipe (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /670 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Parse error in wp-content/plugins/italian-cap-city-search/wrapper.php+82
    syntax error, unexpected end of file

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

This is a short check of server-side resources used by Wp Italian Cap/Cities Search
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.08 ▼6.66
Dashboard /wp-admin3.31 ▲0.0044.41 ▼9.01
Posts /wp-admin/edit.php3.36 ▲0.0047.59 ▼0.13
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.76 ▲0.21
Media Library /wp-admin/upload.php3.23 ▲0.0034.32 ▲5.19

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Wp Italian Cap/Cities Search
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.27 ▼0.951.56 ▼0.5646.16 ▲1.89
Dashboard /wp-admin2,203 ▲124.84 ▼0.0796.57 ▼19.7741.92 ▼4.51
Posts /wp-admin/edit.php2,089 ▼02.04 ▼0.0139.71 ▲3.0034.99 ▼0.47
Add New Post /wp-admin/post-new.php1,533 ▲1923.38 ▲5.67601.58 ▼43.6262.08 ▲11.94
Media Library /wp-admin/upload.php1,388 ▼04.26 ▲0.0195.92 ▼0.1641.95 ▲1.78

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/italian-cap-city-search/widget-settings.php
    • > /wp-content/plugins/italian-cap-city-search/woocommerce-settings.php
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/italian-cap-city-search/class.wp-italian-cap-results-widget.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/italian-cap-city-search/wp-cap-search.php:13
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/italian-cap-city-search/wrapper.php on line 82
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/italian-cap-city-search/views/widget_results.php on line 64
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/italian-cap-city-search/class.wp-italian-cap-search-widget.php:12
    • > PHP Parse error
      syntax error, unexpected 'else' (T_ELSE) in wp-content/plugins/italian-cap-city-search/admin/views/search_form_results.php on line 76
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wpics_load_woocommerce_settings() in wp-content/plugins/italian-cap-city-search/admin/views/woocommerce_settings.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wpics_load_widget_settings() in wp-content/plugins/italian-cap-city-search/admin/views/widget_settings.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === italian-cap-city-search === )
The official readme.txt is a good inspiration

italian-cap-city-search/wp-cap-search.php 92% from 13 tests

Analyzing the main PHP file in "Wp Italian Cap/Cities Search" version 1.0
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("italian-cap-city-search.php" instead of "wp-cap-search.php")

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
Good job! No executable or dangerous file extensions detected678 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP14111223624
JavaScript2192540
CSS24914

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity3.67
▷ Minimum class complexity2.00
▷ Maximum class complexity7.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods12
▷ Static methods541.67%
▷ Public methods1191.67%
▷ Protected methods00.00%
▷ Private methods18.33%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.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 were not PNG files found in your plugin