83% pages-before-posts

Code Review | Pages before Posts

WordPress plugin Pages before Posts scored83%from 54 tests.

About plugin

  • Plugin page: pages-before-posts
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 26, 2014
  • Latest release: Jun 23, 2017
  • Number of updates: 19
  • Update frequency: every 51.3 days
  • Top authors: Greenweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /799 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.01MB] [CPU: ▼6.79ms] Passed 4 tests

An overview of server-side resources used by Pages before Posts
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.49 ▼5.10
Dashboard /wp-admin3.31 ▲0.0152.63 ▼6.53
Posts /wp-admin/edit.php3.36 ▲0.0146.84 ▼3.44
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.94 ▼12.08
Media Library /wp-admin/upload.php3.23 ▲0.0136.02 ▼1.99

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

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

Browser metrics Passed 4 tests

Pages before Posts: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.33 ▲0.131.75 ▼0.1343.05 ▼1.57
Dashboard /wp-admin2,198 ▲185.63 ▲0.0986.67 ▼11.9039.33 ▼7.32
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0540.60 ▲2.8633.98 ▼1.79
Add New Post /wp-admin/post-new.php1,535 ▲718.43 ▼4.64613.91 ▼26.6758.83 ▲4.97
Media Library /wp-admin/upload.php1,394 ▼94.19 ▼0.01101.15 ▼0.0142.16 ▼1.73

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/pages-before-posts/pages-before-posts.php:31

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 81% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid URI ("")
  • Requires at least: Invalid version format
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
Please take inspiration from this readme.txt

pages-before-posts/pages-before-posts.php 77% from 13 tests

The main file in "Pages before Posts" v. 2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Domain Path: The domain path must begin with a forward slash character ("/")
  • Domain Path: Use only dashes and lowercase characters for the domain path ("")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Everything looks great! No dangerous files found in this plugin10 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP182910

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin