73% wp-single-page

Code Review | WP single page

WordPress plugin WP single page scored73%from 54 tests.

About plugin

  • Plugin page: wp-single-page
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3
  • WordPress version: 6.3.1
  • First release: Oct 5, 2015
  • Latest release: Oct 5, 2015
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: tiagofabre (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,849 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.54ms] Passed 4 tests

Server-side resources used by WP single page
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.79 ▲1.12
Dashboard /wp-admin3.35 ▲0.0447.68 ▼5.36
Posts /wp-admin/edit.php3.46 ▲0.1049.39 ▼3.69
Add New Post /wp-admin/post-new.php5.93 ▲0.0597.09 ▼2.82
Media Library /wp-admin/upload.php3.27 ▲0.0436.79 ▼2.27

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: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by WP single page
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.38 ▼1.211.61 ▼0.2743.36 ▼2.97
Dashboard /wp-admin2,206 ▲215.90 ▲0.09113.04 ▲7.6938.45 ▼9.04
Posts /wp-admin/edit.php2,092 ▲31.97 ▼0.0343.28 ▲0.7935.37 ▼2.45
Add New Post /wp-admin/post-new.php1,545 ▲1023.24 ▼0.05600.97 ▼40.0648.24 ▼8.40
Media Library /wp-admin/upload.php1,388 ▼04.17 ▼0.0293.77 ▼13.2944.09 ▲0.16

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin cannot be uninstalled
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'deactivate_wp_sp' not found or invalid function name
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-single-page/admin/partials/single-wp-sp.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-single-page/admin/partials/single-wp-sp-box.php:11

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)
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: A description for screenshot #1 is required in wp-single-page/assets to your readme.txt
  • Plugin Name: You should set the name of your plugin on the first line ( === wp-single-page === )
You can take inspiration from this readme.txt

wp-single-page/wp-sp.php 85% from 13 tests

The main PHP script in "WP single page" version 1.0.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-single-page.php" instead of "wp-sp.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin247 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP980368216
PO File16631

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity1.60
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.18
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods18
▷ Static methods15.56%
▷ Public methods1477.78%
▷ Protected methods00.00%
▷ Private methods422.22%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin