68% pocket-news-generator

Code Review | Pocket News Generator

WordPress plugin Pocket News Generator scored68%from 54 tests.

About plugin

  • Plugin page: pocket-news-gener...
  • Plugin version: 0.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-3.8
  • WordPress version: 6.3.1
  • First release: Dec 10, 2013
  • Latest release: Jan 19, 2014
  • Number of updates: 20
  • Update frequency: every 12.6 days
  • Top authors: marubon (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /2,132 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼1.69MB] [CPU: ▼49.94ms] Passed 4 tests

An overview of server-side resources used by Pocket News Generator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1341.51 ▼6.14
Dashboard /wp-admin2.26 ▼1.058.01 ▼42.88
Posts /wp-admin/edit.php2.26 ▼1.107.87 ▼43.58
Add New Post /wp-admin/post-new.php2.26 ▼3.639.64 ▼83.32
Media Library /wp-admin/upload.php2.26 ▼0.978.01 ▼29.97
Pocket News Generator /wp-admin/tools.php?page=pocket_news_generator_generation_page2.267.56
Pocket News Generator /wp-admin/options-general.php?page=pocket_news_generator_options_page2.269.31

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Pocket News Generator
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲5314.37 ▲0.011.72 ▲0.1641.78 ▲2.67
Dashboard /wp-admin2,205 ▲315.63 ▲0.0683.55 ▼10.9241.87 ▼2.26
Posts /wp-admin/edit.php2,110 ▲131.97 ▼0.0239.98 ▲3.2139.76 ▲5.92
Add New Post /wp-admin/post-new.php1,534 ▼323.66 ▲5.47600.06 ▼26.9950.81 ▼11.29
Media Library /wp-admin/upload.php1,407 ▲44.17 ▲0.01100.80 ▼8.1544.85 ▲0.11
Pocket News Generator /wp-admin/tools.php?page=pocket_news_generator_generation_page1,0001.9923.2328.55
Pocket News Generator /wp-admin/options-general.php?page=pocket_news_generator_options_page1,0702.0323.3731.56

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_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 pocket-news-generator handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

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
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=pocket_news_generator_options_page
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_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 pocket-news-generator handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=pocket_news_generator_options_page
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/tools.php?page=pocket_news_generator_generation_page
    • > Notice in wp-content/plugins/pocket-news-generator/pocket-news-generator.php+401
    Undefined index: action
    • > GET request to /wp-admin/options-general.php?page=pocket_news_generator_options_page
    • > Notice in wp-content/plugins/pocket-news-generator/pocket-news-generator.php+281
    Undefined variable: tmp_request_code
    • > GET request to /wp-admin/options-general.php?page=pocket_news_generator_options_page
    • > Notice in wp-content/plugins/pocket-news-generator/pocket-news-generator.php+315
    Undefined variable: result_consumer_key
    • > GET request to /wp-admin/options-general.php?page=pocket_news_generator_options_page
    • > Notice in wp-content/plugins/pocket-news-generator/pocket-news-generator.php+316
    Undefined variable: result_access_token

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please 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 load_plugin_textdomain() in wp-content/plugins/pocket-news-generator/pocket-news-generator.php:50

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Donate link: Invalid url: ""
  • Screenshots: Please add images for these screenshots: #1 (Prameter registration form in setting page), #2 (Guide to get a consumer key and access token), #3 (Search form for pocket data retrieval), #4 (Sample of generated HTML code)
Please take inspiration from this readme.txt

pocket-news-generator/pocket-news-generator.php 92% from 13 tests

The entry point to "Pocket News Generator" version 0.2.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 232 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected1,044 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP6240187812
PO File17779197
CSS18335

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity21.80
▷ Minimum class complexity4.00
▷ Maximum class complexity64.00
Average method complexity4.59
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods29
▷ Static methods310.34%
▷ Public methods2896.55%
▷ Protected methods00.00%
▷ Private methods13.45%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants50
▷ Global constants00.00%
▷ Class constants50100.00%
▷ Public constants50100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.17MB with 0.10MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png53.78KB21.99KB▼ 59.11%
screenshot-3.png42.28KB18.20KB▼ 56.96%
screenshot-2.png30.33KB13.67KB▼ 54.92%
screenshot-1.png50.94KB20.84KB▼ 59.09%