68% pocket-readability-instapaper-buttons

Code Review | Pocket Readability Instapaper Buttons

WordPress plugin Pocket Readability Instapaper Buttons scored68%from 54 tests.

About plugin

  • Plugin page: pocket-readabilit...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.8.1
  • WordPress version: 6.3.1
  • First release: Feb 24, 2014
  • Latest release: Mar 2, 2014
  • Number of updates: 8
  • Update frequency: every 0.8 days
  • Top authors: SeeYouCloud (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /865 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼1.74MB] [CPU: ▼53.64ms] Passed 4 tests

This is a short check of server-side resources used by Pocket Readability Instapaper Buttons
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0743.58 ▼3.95
Dashboard /wp-admin2.20 ▼1.119.23 ▼43.09
Posts /wp-admin/edit.php2.20 ▼1.157.70 ▼49.10
Add New Post /wp-admin/post-new.php2.20 ▼3.697.40 ▼99.04
Media Library /wp-admin/upload.php2.20 ▼1.038.47 ▼23.34
Pocket Readability Instapaper Buttons /wp-admin/options-general.php?page=pocket-readability-instapaper-buttons-settings2.208.78

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Pocket Readability Instapaper Buttons
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.38 ▲0.091.88 ▲0.1245.81 ▼1.35
Dashboard /wp-admin2,204 ▲305.64 ▼0.0488.95 ▲0.4240.29 ▼4.73
Posts /wp-admin/edit.php2,106 ▲62.04 ▲0.0035.22 ▼8.7238.25 ▲0.87
Add New Post /wp-admin/post-new.php1,556 ▲818.49 ▼4.55634.92 ▼3.4556.43 ▼3.64
Media Library /wp-admin/upload.php1,400 ▼34.25 ▲0.0498.63 ▼1.9144.23 ▼0.34
Pocket Readability Instapaper Buttons /wp-admin/options-general.php?page=pocket-readability-instapaper-buttons-settings9822.0826.3333.70

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style 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 myPluginOptionsStylesheet handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=pocket-readability-instapaper-buttons-settings
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style 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 myPluginOptionsStylesheet handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/pocket-readability-instapaper-buttons/pocket-readability-instapaper-buttons.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #2 (Settings panel in Wordpress Administration.) image missing
  • Donate link: Invalid url: ""
You can take inspiration from this readme.txt

pocket-readability-instapaper-buttons/pocket-readability-instapaper-buttons.php 92% from 13 tests

The principal PHP file in "Pocket Readability Instapaper Buttons" v. 1.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 226 characters long)

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 detected238 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP52915225
CSS10413

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.26MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.PNG37.38KB16.86KB▼ 54.90%
img/logo_kindle.png72.21KB30.80KB▼ 57.34%
img/logo_readability.png36.27KB15.29KB▼ 57.83%
img/logo_instapaper.png30.62KB17.44KB▼ 43.03%
assets/screenshot-1.PNG35.16KB16.50KB▼ 53.06%