83% get-pinterest-feed

Code Review | Get Pinterest Feed

WordPress plugin Get Pinterest Feed scored 83% from 54 tests.

About plugin

  • Plugin page: get-pinterest-feed
  • Plugin version: 0.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.2.1
  • WordPress version: 5.9.2
  • First release: Jan 1, 2013
  • Latest release: Jun 2, 2013
  • Number of updates: 6
  • Update frequency: every 25.3 days
  • Top authors: takumin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,508 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼2.45MB] [CPU: ▼345.51ms] Passed 4 tests

This is a short check of server-side resources used by Get Pinterest Feed
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /1.92 ▼1.594.71 ▼43.93
Dashboard /wp-admin1.94 ▼1.473.92 ▼30.47
Posts /wp-admin/edit.php1.94 ▼1.704.48 ▼33.88
Add New Post /wp-admin/post-new.php1.94 ▼5.034.43 ▼1,273.74
Media Library /wp-admin/upload.php1.94 ▼1.363.77 ▼22.52

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Get Pinterest Feed
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲915.87 ▲0.205.84 ▼0.792.30 ▼0.18
Dashboard /wp-admin2,895 ▲346.15 ▼0.07123.71 ▼17.00156.08 ▼12.27
Posts /wp-admin/edit.php2,685 ▼93.24 ▼0.0061.70 ▼0.64140.76 ▼2.22
Add New Post /wp-admin/post-new.php1,661 ▼9916.10 ▼6.55434.87 ▲7.08157.72 ▼3.54
Media Library /wp-admin/upload.php1,698 ▼05.47 ▲0.00136.52 ▼19.18181.57 ▼9.73

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5768
    wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the imagesloaded handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

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)
Everything seems fine, however this is by no means an exhaustive test

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
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/get-pinterest-feed/GetPinterestFeed.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/get-pinterest-feed/GetPinterestFeed.php:19
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/get-pinterest-feed/GetPinterestFeed.php on line 15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Code written), #2 (Looks like this)
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === get-pinterest-feed === )
The official readme.txt is a good inspiration

get-pinterest-feed/GetPinterestFeed.php 85% from 13 tests

"Get Pinterest Feed" version 0.0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Main file name: Name the main plugin file the same as the plugin slug ("get-pinterest-feed.php" instead of "GetPinterestFeed.php")

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
Good job! No executable or dangerous file extensions detected135 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP13111131
JavaScript2094

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity2.36
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 1.31MB with 1.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png22.24KB4.25KB▼ 80.87%
screenshot-2.png1,320.53KB358.03KB▼ 72.89%