83% pepper-connector

Code Review | Pepper Connector

WordPress plugin Pepper Connector scored83%from 54 tests.

About plugin

  • Plugin page: pepper-connector
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.8.2
  • WordPress version: 6.3.1
  • First release: Nov 24, 2021
  • Latest release: Feb 2, 2022
  • Number of updates: 6
  • Update frequency: every 11.8 days
  • Top authors: peppercontent (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /423 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.72ms] Passed 4 tests

Analyzing server-side resources used by Pepper Connector
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0042.01 ▼4.62
Dashboard /wp-admin3.32 ▲0.0248.49 ▼4.89
Posts /wp-admin/edit.php3.37 ▲0.0154.56 ▲4.87
Add New Post /wp-admin/post-new.php5.93 ▲0.0488.95 ▲0.57
Media Library /wp-admin/upload.php3.24 ▲0.0136.41 ▼1.95

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
pepper_settings_option_name
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Pepper Connector
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲6514.35 ▼0.181.89 ▲0.0245.06 ▲0.01
Dashboard /wp-admin2,204 ▲245.57 ▼0.10109.01 ▲17.8941.65 ▲2.53
Posts /wp-admin/edit.php2,115 ▲151.99 ▲0.0135.35 ▼1.0131.82 ▼3.02
Add New Post /wp-admin/post-new.php1,536 ▲823.66 ▲0.62669.78 ▲41.0355.83 ▲7.13
Media Library /wp-admin/upload.php1,412 ▲94.18 ▼0.0397.69 ▼4.3941.66 ▼1.09

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

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
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 take a closer look at the following
  • 5× 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/pepper-connector/includes/get_apis.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/pepper-connector/includes/settings.php:135
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pepper-connector/includes/webhooks.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pepper-connector/includes/post_apis.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_uninstall_hook() in wp-content/plugins/pepper-connector/pepper.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: pepperconnector, share content, pepper, peppercontent, blog

pepper-connector/pepper.php 77% from 13 tests

The main file in "Pepper Connector" v. 2.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("pepper-connector.php" instead of "pepper.php")
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • 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 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin991 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP717051990
Markdown1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions55
▷ Named functions2341.82%
▷ Anonymous functions3258.18%
Constants2
▷ Global constants2100.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 are no PNG files in this plugin