78% pocket-wp

Code Review | Pocket WP

WordPress plugin Pocket WP scored 78% from 54 tests.

About plugin

  • Plugin page: pocket-wp
  • Plugin version: 0.4.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 6.3.1
  • First release: Dec 30, 2014
  • Latest release: Mar 9, 2015
  • Number of updates: 12
  • Update frequency: every 5.8 days
  • Top authors: ciaranm (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active / 2,080 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: ▲0.08MB] [CPU: ▲0.08ms] Passed 4 tests

Analyzing server-side resources used by Pocket WP
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0943.56 ▲2.07
Dashboard /wp-admin3.39 ▲0.0852.47 ▲4.17
Posts /wp-admin/edit.php3.50 ▲0.1453.28 ▲1.46
Add New Post /wp-admin/post-new.php5.97 ▲0.08117.37 ▲17.25
Media Library /wp-admin/upload.php3.31 ▲0.0838.34 ▼7.37
Pocket WP /wp-admin/options-general.php?page=pocket_wp3.2532.67

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
pwp_activation_run
can_compress_scripts
widget_recent-posts
widget_pwp_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Pocket WP: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲2613.31 ▲0.011.67 ▼2.5640.39 ▼2.42
Dashboard /wp-admin2,210 ▲74.86 ▼0.04104.71 ▼8.3240.88 ▼6.83
Posts /wp-admin/edit.php2,099 ▲102.05 ▲0.0442.27 ▲2.6836.74 ▲1.27
Add New Post /wp-admin/post-new.php1,540 ▲2622.91 ▲5.27583.00 ▼204.6556.59 ▼1.27
Media Library /wp-admin/upload.php1,389 ▲14.26 ▼0.0598.97 ▼12.8941.73 ▼4.16
Pocket WP /wp-admin/options-general.php?page=pocket_wp8711.6827.1640.20

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 8 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_pwp_widget
    • widget_recent-posts
    • widget_theysaidso_widget
    • pwp_activation_run
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=pocket_wp
    • > Notice in wp-content/plugins/pocket-wp/pocket-wp.php+161
    Trying to access array offset on value of type bool

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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/pocket-wp/pocket-wp.php

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: widget, links, pocket, shortcode

pocket-wp/pocket-wp.php Passed 13 tests

"Pocket WP" version 0.4.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
99 characters long description:
Adds a shortcode and widget which allows you to display your pocket links in a WordPress page/post.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected405 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP211889383
CSS14022

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity18.50
▷ Minimum class complexity16.00
▷ Maximum class complexity21.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.64MB with 0.44MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshots/screenshot-5.png38.20KB12.11KB▼ 68.31%
screenshots/screenshot-4.png51.36KB16.64KB▼ 67.60%
screenshots/screenshot-1.png311.23KB109.70KB▼ 64.75%
screenshots/screenshot-2.png207.30KB70.89KB▼ 65.80%
screenshots/screenshot-3.png50.54KB12.59KB▼ 75.09%