94% pages-are-posts

Code Review | Pages are Posts

WordPress plugin Pages are Posts scored 94% from 54 tests.

About plugin

  • Plugin page: pages-are-posts
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.3
  • WordPress version: 5.9.2
  • First release: Sep 13, 2013
  • Latest release: Aug 12, 2015
  • Number of updates: 8
  • Update frequency: every 87.3 days
  • Top authors: tatti (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active / 4,410 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.13MB] [CPU: ▼299.74ms] Passed 4 tests

A check of server-side resources used by Pages are Posts
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.09 ▼0.4617.97 ▼31.84
Dashboard /wp-admin3.45 ▲0.0137.62 ▲5.36
Posts /wp-admin/edit.php3.68 ▲0.0144.62 ▲7.93
Add New Post /wp-admin/post-new.php6.94 ▼0.0698.26 ▼1,175.63
Media Library /wp-admin/upload.php3.33 ▲0.0127.71 ▲3.15

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Pages are Posts: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,842 ▲8815.91 ▲0.256.13 ▼0.233.16 ▲0.37
Dashboard /wp-admin2,888 ▲346.03 ▼0.13133.68 ▼0.88196.27 ▲30.63
Posts /wp-admin/edit.php2,694 ▲93.23 ▼0.0165.12 ▼4.04146.98 ▼7.26
Add New Post /wp-admin/post-new.php1,752 ▲9120.62 ▲4.31468.14 ▲34.93158.70 ▼5.65
Media Library /wp-admin/upload.php1,698 ▼05.42 ▼0.08146.73 ▲4.01189.15 ▲0.14

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pages-are-posts/pages-are-posts.php:39

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: pages, feed, tags, rss, tag pages

pages-are-posts/pages-are-posts.php Passed 13 tests

The main PHP script in "Pages are Posts" version 1.1 is automatically included on every request by WordPress
109 characters long description:
Include pages to most views where normally only posts are shown. Adds tags, categories and excerpts to pages.

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 plugin24 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP163024

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.88
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%
Functions2
▷ Named functions2100.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