87% get-blog-posts

Code Review | Get blog posts

WordPress plugin Get blog posts scored 87% from 54 tests.

About plugin

  • Plugin page: get-blog-posts
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.3.2
  • WordPress version: 5.8.1
  • First release: May 12, 2020
  • Latest release: May 21, 2020
  • Number of updates: 6
  • Update frequency: every 2.7 days
  • Top authors: palindromecommunications (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 188 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.16MB] [CPU: ▼151.93ms] Passed 4 tests

An overview of server-side resources used by Get blog posts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.1728.19 ▲1.95
Dashboard /wp-admin2.95 ▼0.1025.44 ▼6.87
Posts /wp-admin/edit.php3.01 ▼0.1028.83 ▼13.49
Add New Post /wp-admin/post-new.php5.02 ▼0.4271.37 ▼581.42
Media Library /wp-admin/upload.php2.98 ▼0.0225.99 ▼5.95

Server storage [IO: ▲0.05MB] [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: 23 new files
Database: no new tables, 1 new option
New WordPress options
get_blog_posts_submitted

Browser metrics Passed 4 tests

Checking browser requirements for Get blog posts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,839 ▲24316.80 ▲0.9410.74 ▲3.0049.52 ▼0.37
Dashboard /wp-admin2,997 ▲636.01 ▲0.05137.15 ▼9.46108.28 ▼9.92
Posts /wp-admin/edit.php2,766 ▲272.69 ▲0.0070.18 ▲6.4186.87 ▼3.44
Add New Post /wp-admin/post-new.php1,703 ▲2018.79 ▼0.02367.84 ▲6.25110.98 ▼0.98
Media Library /wp-admin/upload.php1,837 ▲305.03 ▲0.01156.68 ▼19.15120.99 ▼14.20

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/get-blog-posts/public/partials/get-blog-posts-public-display.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/get-blog-posts/admin/partials/get-blog-posts-admin-display.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 69% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • License: No value
  • Contributors: Plugin contributors field is missing
  • Screenshots: Please add images for these screenshots: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
  • Contributors: No tags were detected
  • License uri: Please fix this invalid URI: ""
You can look at the official readme.txt

get-blog-posts/get-blog-posts.php 92% from 13 tests

This is the main PHP file of "Get blog posts" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 202 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 plugin338 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12123535291
CSS25825
JavaScript242922

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity1.86
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.22
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27.41%
▷ Public methods2281.48%
▷ Protected methods00.00%
▷ Private methods518.52%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/partials/google-drive.png2.98KB2.03KB▼ 31.77%