84% geocoded-posts

Code Review | Geocoded posts

WordPress plugin Geocoded posts scored84%from 54 tests.

About plugin

  • Plugin page: geocoded-posts
  • Plugin version: 0.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9.5
  • WordPress version: 6.3.1
  • First release: Dec 27, 2016
  • Latest release: Apr 8, 2018
  • Number of updates: 15
  • Update frequency: every 31.1 days
  • Top authors: svrooij (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /749 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.57MB] [CPU: ▼15.08ms] Passed 4 tests

An overview of server-side resources used by Geocoded posts
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0836.50 ▼4.07
Dashboard /wp-admin3.42 ▲0.1246.81 ▼0.90
Posts /wp-admin/edit.php3.54 ▲0.1848.87 ▲2.53
Add New Post /wp-admin/post-new.php3.30 ▼2.5837.88 ▼57.64
Media Library /wp-admin/upload.php3.35 ▲0.1234.41 ▲2.30

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_geocoded_posts_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Geocoded posts
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4314.48 ▲0.101.75 ▼0.8939.33 ▼7.80
Dashboard /wp-admin2,206 ▲155.84 ▲0.01100.09 ▼4.2238.94 ▼3.89
Posts /wp-admin/edit.php2,089 ▲32.01 ▼0.0139.96 ▲1.3135.29 ▲0.29
Add New Post /wp-admin/post-new.php6,510 ▲4,97723.34 ▲0.14886.33 ▲217.0960.46 ▲14.30
Media Library /wp-admin/upload.php1,385 ▼34.24 ▲0.0596.83 ▼10.9141.73 ▼3.58

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
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_geocoded_posts_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% 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
The following issues need your attention
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/geocoded-posts/includes/class-geocoded-posts-rest-api.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/geocoded-posts/includes/class-geocoded-posts-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/geocoded-posts/includes/class-geocoded-posts-editor.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/geocoded-posts/geocoded-posts.php:43
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/geocoded-posts/includes/class-geocoded-posts-geocoder.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/geocoded-posts/includes/class-geocoded-posts-settings.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: geocode, metadata, location

geocoded-posts/geocoded-posts.php Passed 13 tests

The primary PHP file in "Geocoded posts" version 0.0.7 is used by WordPress to initiate all plugin functionality
62 characters long description:
Widget with geocoded posts and editing geo location on a post.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected532 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP6127110448
JavaScript2101184

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity12.33
▷ Minimum class complexity2.00
▷ Maximum class complexity22.00
Average method complexity2.76
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods34
▷ Static methods12.94%
▷ Public methods3397.06%
▷ Protected methods00.00%
▷ Private methods12.94%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
There were not PNG files found in your plugin