84% bbpress-topic-location

Code Review | bbPress Topic Location

WordPress plugin bbPress Topic Location scored84%from 54 tests.

About plugin

  • Plugin page: bbpress-topic-loc...
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.3.2
  • WordPress version: 6.3.1
  • First release: May 31, 2012
  • Latest release: Jan 23, 2020
  • Number of updates: 19
  • Update frequency: every 147.1 days
  • Top authors: grosbouff (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,052 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.18MB] [CPU: ▼3.67ms] Passed 4 tests

Analyzing server-side resources used by bbPress Topic Location
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1839.40 ▼2.34
Dashboard /wp-admin3.49 ▲0.1945.61 ▼4.04
Posts /wp-admin/edit.php3.60 ▲0.2546.82 ▼2.70
Add New Post /wp-admin/post-new.php6.07 ▲0.1993.12 ▼5.60
Media Library /wp-admin/upload.php3.41 ▲0.1839.49 ▲4.30

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts
bbptl-db
can_compress_scripts
theysaidso_admin_options
widget_bbptl_search_widget

Browser metrics Passed 4 tests

A check of browser resources used by bbPress Topic Location
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,929 ▲19414.07 ▼0.315.84 ▲3.8844.46 ▼1.30
Dashboard /wp-admin2,224 ▲325.87 ▲0.89100.36 ▼7.1241.81 ▼0.37
Posts /wp-admin/edit.php2,107 ▲182.08 ▲0.0138.28 ▼6.6235.45 ▼3.02
Add New Post /wp-admin/post-new.php1,546 ▲1823.40 ▲5.22678.86 ▲25.9153.51 ▼13.94
Media Library /wp-admin/upload.php1,406 ▲214.21 ▲0.01100.69 ▼0.4445.27 ▲1.88

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 8 options in the database
    • bbptl-db
    • widget_bbptl_search_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 fix the following
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/bbpress-topic-location/bbpress-topic-location.php:94
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bbpress() in wp-content/plugins/bbpress-topic-location/templates/search-feedback.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/bbpress-topic-location/bbptl-widgets.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bbptl_get_current_unit_obj() in wp-content/plugins/bbpress-topic-location/templates/search-form.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'bbPressTopicLocationGeoData' not found in wp-content/plugins/bbpress-topic-location/templates/geodata-edit.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bbpress-topic-location/bbptl-admin.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'bbPressTopicLocationGeoData' not found in wp-content/plugins/bbpress-topic-location/templates/geodata-display.php:4

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 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: open street map, geolocation, geocoding, bbpress

bbpress-topic-location/bbpress-topic-location.php 92% from 13 tests

The principal PHP file in "bbPress Topic Location" v. 1.0.9 is loaded by WordPress automatically on each request
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected1,143 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP8310209765
JavaScript1374133
CSS1818122
Sass1170115
Ruby1108

PHP code Passed 2 tests

Analyzing 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.29
Average class complexity24.75
▷ Minimum class complexity2.00
▷ Maximum class complexity66.00
Average method complexity2.58
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods60
▷ Static methods1118.33%
▷ Public methods5998.33%
▷ Protected methods00.00%
▷ Private methods11.67%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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