10% wp-page-extension

Code Review | WP Page Extension

WordPress plugin WP Page Extension scored10%from 54 tests.

About plugin

  • Plugin page: wp-page-extension
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.3
  • WordPress version: 6.3.1
  • First release: Aug 15, 2012
  • Latest release: Aug 30, 2012
  • Number of updates: 22
  • Update frequency: every 0.7 days
  • Top authors: daddydesign (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

100+ active /10,098 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/wp-page-extension/wp-page_extension.php+10
    Methods with the same name as their class will not be constructors in a future version of PHP; wp_fake_url has a deprecated constructor

Server metrics [RAM: ▼1.61MB] [CPU: ▼52.10ms] Passed 4 tests

This is a short check of server-side resources used by WP Page Extension
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.38 ▼1.084.69 ▼34.80
Dashboard /wp-admin2.40 ▼0.906.28 ▼48.28
Posts /wp-admin/edit.php2.40 ▼0.966.76 ▼46.54
Add New Post /wp-admin/post-new.php2.40 ▼3.497.09 ▼78.78
Media Library /wp-admin/upload.php2.40 ▼0.836.35 ▼29.58

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 4 new files
Database: 1 new table, 9 new options
New tables
page_fake_url
New WordPress options
can_compress_scripts
widget_recent-posts
extension_enabled
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
extFlag
current_extension

Browser metrics Passed 4 tests

A check of browser resources used by WP Page Extension
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.61 ▼0.761.70 ▲0.0746.07 ▲2.62
Dashboard /wp-admin2,209 ▲246.02 ▼0.0299.66 ▼6.4042.77 ▼3.35
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0439.96 ▼0.2835.81 ▼3.34
Add New Post /wp-admin/post-new.php1,372 ▼16321.52 ▼2.09528.82 ▼185.7760.40 ▲4.41
Media Library /wp-admin/upload.php1,388 ▼04.22 ▲0.0597.61 ▼9.5142.76 ▼2.16

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/wp-page-extension/wp-page_extension.php+10
    Methods with the same name as their class will not be constructors in a future version of PHP; wp_fake_url has a deprecated constructor
  • Zombie tables were found after uninstall: 1 table
    • page_fake_url
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% 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 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
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-page-extension/view/plugin_view.php
  • 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/wp-page-extension/wp-page_extension.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Tags: There are too many tags (14 tag instead of maximum 10)
  • Screenshots: Screenshot #1 (Page Settings) image not found
You can take inspiration from this readme.txt

wp-page-extension/wp-page_extension.php 92% from 13 tests

The principal PHP file in "WP Page Extension" v. 1.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-page-extension.php" instead of "wp-page_extension.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin654 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP214629654

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity165.00
▷ Minimum class complexity165.00
▷ Maximum class complexity165.00
Average method complexity15.91
▷ Minimum method complexity1.00
▷ Maximum method complexity96.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.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
There were not PNG files found in your plugin