72% getpocket

Code Review | Pocket Read it Later Button

WordPress plugin Pocket Read it Later Button scored72%from 54 tests.

About plugin

  • Plugin page: getpocket
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-3.5
  • WordPress version: 6.3.1
  • First release: Jan 23, 2013
  • Latest release: Jan 23, 2013
  • Number of updates: 9
  • Update frequency: every 0.3 days
  • Top authors: alexmoss (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,163 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.68ms] Passed 4 tests

A check of server-side resources used by Pocket Read it Later Button
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.20 ▼0.18
Dashboard /wp-admin3.33 ▲0.0344.07 ▼6.58
Posts /wp-admin/edit.php3.39 ▲0.0347.55 ▲3.10
Add New Post /wp-admin/post-new.php5.92 ▲0.0388.58 ▼3.77
Media Library /wp-admin/upload.php3.26 ▲0.0234.67 ▼0.18
Pocket Read it Later Button /wp-admin/options-general.php?page=getpocket3.2027.53

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Pocket Read it Later Button
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.48 ▲0.131.84 ▲0.1142.80 ▲3.45
Dashboard /wp-admin2,207 ▲195.77 ▲0.9195.16 ▼10.1537.24 ▼8.86
Posts /wp-admin/edit.php2,093 ▲42.06 ▲0.0138.45 ▲3.0435.47 ▼2.75
Add New Post /wp-admin/post-new.php1,552 ▲3118.23 ▼5.07627.58 ▼41.8066.47 ▲14.03
Media Library /wp-admin/upload.php1,392 ▲14.24 ▲0.0097.86 ▼8.1243.31 ▼2.63
Pocket Read it Later Button /wp-admin/options-general.php?page=getpocket1,2487.64237.8373.83

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=getpocket
    • > Notice in wp-content/plugins/getpocket/class-admin.php+130
    Undefined variable: domain
    • > GET request to /wp-admin/options-general.php?page=getpocket
    • > Warning in wp-content/plugins/getpocket/class-admin.php+139
    Invalid argument supplied for foreach()

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× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/getpocket/class-frontend.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/getpocket/class-admin.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/getpocket/getpocket.php:22

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=getpocket
    • > Network (severe)
    http://platform.stumbleupon.com/1/widgets.js - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/options-general.php?page=getpocket
    • > Javascript (severe) in unknown
    https://button.buffer.com/button/?id=90b71b89179a07e1&url=http%3A%2F%2F3doordigital.com%2Fwordpress%2Fplugins%2Fgetpocket-read-it-later-button%2F&text=Just%20been%20using%20Pocket%20Read%20it%20Later%20Button%20%23WordPress%20plugin&via=alexmoss&count=horizontal&placement=button&utm_source=http%3A%2F%2Fwp.com%2Fwp-admin%2Foptions-general.php%3Fpage%3Dgetpocket&utm_medium=buffer_button&utm_campaign=buffer 15:647 Uncaught TypeError: Cannot set properties of null (setting 'onclick')
    • > GET request to /wp-admin/options-general.php?page=getpocket
    • > Other (severe) in unknown
    chrome-error://chromewebdata/ - Refused to display 'https://developers.google.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: pocket, read it later, getpocket, bookmarklet

getpocket/getpocket.php 92% from 13 tests

"Pocket Read it Later Button" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 231 characters long)

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
There were no executable files found in this plugin259 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP33218158
CSS1120101

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
3dd-logo.png14.63KB5.34KB▼ 63.49%