73% get-pinterest-feed

Code Review | Get Pinterest Feed

WordPress plugin Get Pinterest Feed scored73%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: 6.3.1
  • 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,652 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.96MB] [CPU: ▼49.15ms] Passed 4 tests

Analyzing server-side resources used by Get Pinterest Feed
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.438.83 ▼30.74
Dashboard /wp-admin2.05 ▼1.267.61 ▼43.78
Posts /wp-admin/edit.php2.05 ▼1.316.58 ▼40.00
Add New Post /wp-admin/post-new.php2.05 ▼3.846.98 ▼82.08
Media Library /wp-admin/upload.php2.05 ▼1.185.43 ▼28.34

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Get Pinterest Feed
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6813.32 ▼0.974.91 ▲2.7943.48 ▼1.83
Dashboard /wp-admin2,209 ▲185.89 ▲1.00103.28 ▼3.7038.80 ▼5.56
Posts /wp-admin/edit.php2,086 ▼62.12 ▲0.1434.78 ▼2.6737.35 ▲6.70
Add New Post /wp-admin/post-new.php1,514 ▼1917.53 ▼5.82681.86 ▲1.6452.68 ▼3.52
Media Library /wp-admin/upload.php1,388 ▼04.17 ▼0.1493.40 ▼3.3344.28 ▼1.53

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function 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.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
The following issues need your attention
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > 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
    • > 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 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

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)
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (Code written), #2 (Looks like this)
  • Plugin Name: You should set the name of your plugin on the first line ( === get-pinterest-feed === )
You can take inspiration from this readme.txt

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

The principal PHP file in "Get Pinterest Feed" v. 0.0.3 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: Even though not officially enforced, the main plugin file should be 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 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected135 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP13111131
JavaScript2094

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems 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

PNG files should be compressed to save space and minimize bandwidth usage
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%