78% wp-pocket-urls

Code Review | WP Pocket URLs

WordPress plugin WP Pocket URLs scored78%from 54 tests.

About plugin

  • Plugin page: wp-pocket-urls
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Aug 13, 2020
  • Latest release: Aug 31, 2023
  • Number of updates: 11
  • Update frequency: every 101.2 days
  • Top authors: coderevolution (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

80+ active /1,726 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.37MB] [CPU: ▲3.78ms] Passed 4 tests

Analyzing server-side resources used by WP Pocket URLs
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.3547.50 ▲8.88
Dashboard /wp-admin3.74 ▲0.3954.46 ▼4.76
Posts /wp-admin/edit.php3.77 ▲0.4156.16 ▲10.40
Add New Post /wp-admin/post-new.php6.26 ▲0.3690.45 ▲1.13
Media Library /wp-admin/upload.php3.59 ▲0.3642.90 ▲9.86
All Links /wp-admin/edit.php?post_type=wp_pocketurl_link3.6245.47
Other Plugins /wp-admin/edit.php?post_type=wp_pocketurl_link&page=wp_pocketurl_link_other3.5637.70
Reports /wp-admin/edit.php?post_type=wp_pocketurl_link&page=wp_pocketurl_link_reports3.5842.17
Settings /wp-admin/edit.php?post_type=wp_pocketurl_link&page=wp_pocketurl_link_settings3.5639.30
Add New /wp-admin/post-new.php?post_type=wp_pocketurl_link3.6750.05
Link Categories /wp-admin/edit-tags.php?taxonomy=wp_pocketurl_link_category&post_type=wp_pocketurl_link3.5948.65

Server storage [IO: ▲0.09MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 19 new files
Database: 1 new table, 6 new options
New tables
wp_pocketurl_clicks
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Pocket URLs
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲14114.35 ▼0.271.78 ▲0.1942.32 ▲0.57
Dashboard /wp-admin2,293 ▲1135.55 ▼0.0581.72 ▼4.4938.81 ▼4.40
Posts /wp-admin/edit.php2,140 ▲402.09 ▲0.1336.40 ▼0.4032.21 ▼4.22
Add New Post /wp-admin/post-new.php1,558 ▲3223.36 ▲0.41655.68 ▼2.0951.03 ▼1.68
Media Library /wp-admin/upload.php1,440 ▲434.20 ▲0.0399.46 ▼0.8642.45 ▼3.40
All Links /wp-admin/edit.php?post_type=wp_pocketurl_link1,1421.9331.0730.99
Other Plugins /wp-admin/edit.php?post_type=wp_pocketurl_link&page=wp_pocketurl_link_other9882.0625.0528.89
Reports /wp-admin/edit.php?post_type=wp_pocketurl_link&page=wp_pocketurl_link_reports1,0074.8644.5044.32
Settings /wp-admin/edit.php?post_type=wp_pocketurl_link&page=wp_pocketurl_link_settings1,0011.8127.9028.55
Add New /wp-admin/post-new.php?post_type=wp_pocketurl_link1,6902.6052.5462.47
Link Categories /wp-admin/edit-tags.php?taxonomy=wp_pocketurl_link_category&post_type=wp_pocketurl_link1,3252.2428.3730.27

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Please take a closer look at the following
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant wp_pocketurl_path - assumed 'wp_pocketurl_path' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-pocket-urls/assets/views/clicks_details.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'wp_pocketurl_pathclasses/class-wp-pocketurl-clicks.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-pocket-urls/assets/views/clicks_details.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/wp-pocket-urls/assets/views/other.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wp-pocket-urls/assets/views/link-options.php:2
    • > PHP Warning
      require_once(wp_pocketurl_pathclasses/class-wp-pocketurl-clicks.php): failed to open stream: No such file or directory in wp-content/plugins/wp-pocket-urls/assets/views/clicks_details.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/wp-pocket-urls/assets/views/single-wp_pocketurl_link.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/wp-pocket-urls/assets/views/reports.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/wp-pocket-urls/assets/views/settings.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/edit.php?post_type=wp_pocketurl_link&page=wp_pocketurl_link_reports
    • > Network (severe)
    wp-content/plugins/wp-pocket-urls/assets/js/reports.js?ver=1.0.0 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 31 tag instead of maximum 10
You can take inspiration from this readme.txt

wp-pocket-urls/wp-pocketurl.php 85% from 13 tests

The primary PHP file in "WP Pocket URLs" version 1.0.2 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-pocket-urls.php" instead of "wp-pocketurl.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin1,716 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP141122311,555
CSS11098
JavaScript25163

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity19.50
▷ Minimum class complexity7.00
▷ Maximum class complexity37.00
Average method complexity2.61
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods69
▷ Static methods57.25%
▷ Public methods6695.65%
▷ Protected methods00.00%
▷ Private methods34.35%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There are no PNG files in this plugin