10% indie-coffee-shops

Code Review | Indie Coffee Shops

WordPress plugin Indie Coffee Shops scored10%from 54 tests.

About plugin

  • Plugin page: indie-coffee-shops
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3
  • WordPress version: 6.3.1
  • First release: Nov 23, 2015
  • Latest release: Nov 26, 2015
  • Number of updates: 11
  • Update frequency: every 0.3 days
  • Top authors: dontanios (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /627 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
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/indie-coffee-shops/indiecoffee.php+341
    file_get_contents(http://api.indie.coffee/v1/shops): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden

Server metrics [RAM: ▲0.05MB] [CPU: ▼8.88ms] Passed 4 tests

Analyzing server-side resources used by Indie Coffee Shops
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0642.23 ▲2.68
Dashboard /wp-admin3.36 ▲0.0244.53 ▼18.49
Posts /wp-admin/edit.php3.41 ▲0.0647.32 ▲1.60
Add New Post /wp-admin/post-new.php5.96 ▲0.0881.90 ▼17.49
Media Library /wp-admin/upload.php3.28 ▲0.0634.65 ▼1.13

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
shopinfo_json_time
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Indie Coffee Shops: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲6314.45 ▲0.162.20 ▲0.2357.44 ▲14.17
Dashboard /wp-admin2,215 ▲304.88 ▲0.0199.74 ▼16.9040.27 ▼1.84
Posts /wp-admin/edit.php2,102 ▲132.04 ▼0.0134.25 ▼3.6829.54 ▼3.71
Add New Post /wp-admin/post-new.php6,253 ▲4,72518.80 ▼4.46862.55 ▲182.0640.59 ▼18.44
Media Library /wp-admin/upload.php1,414 ▲264.16 ▼0.0587.56 ▼19.1540.79 ▼4.52

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

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)
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following
  • 1× 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/indie-coffee-shops/indiecoffee.php:17

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === indie-coffee-shops === )
You can look at the official readme.txt

indie-coffee-shops/indiecoffee.php 92% from 13 tests

The principal PHP file in "Indie Coffee Shops" v. 1.3 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("indie-coffee-shops.php" instead of "indiecoffee.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected233 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP19546221
JavaScript11012

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity54.00
▷ Minimum class complexity54.00
▷ Maximum class complexity54.00
Average method complexity5.82
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods218.18%
▷ Public methods1090.91%
▷ Protected methods00.00%
▷ Private methods19.09%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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