72% better-posts-plus

Code Review | Better Posts Plus

WordPress plugin Better Posts Plus scored72%from 54 tests.

About plugin

  • Plugin page: better-posts-plus
  • Plugin version: 0.9.5
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-4.9.8
  • WordPress version: 6.3.1
  • First release: Sep 12, 2018
  • Latest release: Sep 20, 2018
  • Number of updates: 19
  • Update frequency: every 0.4 days
  • Top authors: micosh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,076 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.56MB] [CPU: ▼28.55ms] Passed 4 tests

This is a short check of server-side resources used by Better Posts Plus
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.78 ▼0.6814.58 ▼29.95
Dashboard /wp-admin3.22 ▼0.0834.05 ▼18.98
Posts /wp-admin/edit.php3.15 ▼0.2131.80 ▼17.40
Add New Post /wp-admin/post-new.php4.62 ▼1.2742.53 ▼47.88
Media Library /wp-admin/upload.php3.25 ▲0.0235.60 ▼4.36
Restore defaults /wp-admin/admin.php?page=rp_aimweb_reset3.2130.78
Better Posts+ Reorder your blog! /wp-admin/admin.php?page=rp_aimweb_menu3.2835.59
Settings /wp-admin/admin.php?page=rp_aimweb_menu_settings3.4234.44

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Better Posts Plus
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲8513.20 ▼1.361.68 ▼0.1743.58 ▼1.80
Dashboard /wp-admin2,237 ▲494.86 ▼1.05117.42 ▲4.3645.65 ▲2.38
Posts /wp-admin/edit.php2,123 ▲342.02 ▲0.0040.69 ▲4.1738.71 ▼0.77
Add New Post /wp-admin/post-new.php1,558 ▲3723.08 ▼0.47648.82 ▲52.4751.99 ▼0.93
Media Library /wp-admin/upload.php1,422 ▲404.26 ▲0.07101.49 ▼13.6143.60 ▼1.11
Restore defaults /wp-admin/admin.php?page=rp_aimweb_reset7862.0627.0629.29
Better Posts+ Reorder your blog! /wp-admin/admin.php?page=rp_aimweb_menu8982.0225.5730.75
Settings /wp-admin/admin.php?page=rp_aimweb_menu_settings1,3161.7227.1429.28

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 22 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rp_aimweb_menu_settings
    • > Notice in wp-content/plugins/better-posts-plus/admin/rp-aimweb-settings.php+25
    Trying to access array offset on value of type bool

SRP 0% 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
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/better-posts-plus/rp-aimweb.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/better-posts-plus/admin/rp-aimweb-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/better-posts-plus/admin/rp-aimweb-main.php:2

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 93% from 29 tests

readme.txt 94% 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 to be fixed:
  • Donate link: Invalid URI ("")
The official readme.txt is a good inspiration

better-posts-plus/rp-aimweb.php 92% from 13 tests

The entry point to "Better Posts Plus" version 0.9.5 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("better-posts-plus.php" instead of "rp-aimweb.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected690 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP416129690

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity59.00
▷ Minimum class complexity59.00
▷ Maximum class complexity59.00
Average method complexity5.46
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected