83% wp-places

Code Review | WP_Places

WordPress plugin WP_Places scored83%from 54 tests.

About plugin

  • Plugin page: wp-places
  • Plugin version: 2.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Dec 16, 2015
  • Latest release: Oct 11, 2018
  • Number of updates: 57
  • Update frequency: every 18.1 days
  • Top authors: binarygary (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

30+ active /3,808 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.41MB] [CPU: ▼4.74ms] Passed 4 tests

Server-side resources used by WP_Places
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.93 ▲0.4741.77 ▼6.62
Dashboard /wp-admin3.75 ▲0.4151.68 ▼8.77
Posts /wp-admin/edit.php3.80 ▲0.4548.97 ▼0.37
Add New Post /wp-admin/post-new.php6.27 ▲0.3997.02 ▼3.18
Media Library /wp-admin/upload.php3.61 ▲0.3938.77 ▲3.57

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 353 new files
Database: no new tables, 10 new options
New WordPress options
db_upgraded
widget_wp-places-hours
can_compress_scripts
widget_recent-comments
wp_places_settings
wp_places_legacy
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_wp-places-map

Browser metrics Passed 4 tests

A check of browser resources used by WP_Places
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.22 ▼1.161.52 ▼0.1538.58 ▲2.60
Dashboard /wp-admin2,222 ▲345.86 ▲0.9696.76 ▼9.9840.98 ▼0.51
Posts /wp-admin/edit.php2,105 ▲132.05 ▲0.0536.87 ▼2.8334.49 ▼1.87
Add New Post /wp-admin/post-new.php1,546 ▲1823.37 ▲5.05591.32 ▼48.5257.74 ▼1.28
Media Library /wp-admin/upload.php1,401 ▲104.20 ▼0.0098.46 ▼2.8844.53 ▼2.95

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • widget_recent-comments
    • wp_places_legacy
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_wp-places-hours
    • widget_theysaidso_widget
    • wp_places_settings
    • widget_wp-places-map

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 | 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
The following issues need your attention
  • 32× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/wp-places/vendor/cmb2/includes/types/CMB2_Type_Text_Datetime_Timestamp_Timezone.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/wp-places/vendor/cmb2/includes/types/CMB2_Type_Picker_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-places/WP_Places.php:426
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/wp-places/vendor/cmb2/includes/types/CMB2_Type_Wysiwyg.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/wp-places/vendor/cmb2/includes/types/CMB2_Type_Multi_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_File_Base' not found in wp-content/plugins/wp-places/vendor/cmb2/includes/types/CMB2_Type_File_List.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/wp-places/vendor/cmb2/includes/types/CMB2_Type_Checkbox.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-places/includes/class-hours.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/wp-places/vendor/cmb2/includes/types/CMB2_Type_Taxonomy_Radio.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_File_Base' not found in wp-content/plugins/wp-places/vendor/cmb2/includes/types/CMB2_Type_File.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === wp-places === )
The official readme.txt might help

wp-places/WP_Places.php 85% from 13 tests

The entry point to "WP_Places" version 2.1.2 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-places.php" instead of "WP_Places.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin40,781 lines of code in 205 files:
LanguageFilesBlank linesComment linesLines of code
PO File11912,73116,33829,151
PHP531,5344,0004,923
CSS121,0021,0344,406
Sass13238251,149
JavaScript4179136732
Markdown31350393
JSON10027

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity14.00
▷ Minimum class complexity1.00
▷ Maximum class complexity145.00
Average method complexity3.29
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes66
▷ Abstract classes46.06%
▷ Concrete classes6293.94%
▷ Final classes11.61%
Methods375
▷ Static methods318.27%
▷ Public methods33789.87%
▷ Protected methods359.33%
▷ Private methods30.80%
Functions27
▷ Named functions27100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants350.00%
▷ Class constants350.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
15 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/cmb2/images/ico-delete.png0.70KB0.72KB0.00%
vendor/cmb2/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
vendor/cmb2/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
vendor/cmb2/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
vendor/cmb2/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%