10% singlepage

Code Review | Singlepage Website

WordPress plugin Singlepage Website scored10%from 54 tests.

About plugin

  • Plugin page: singlepage
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.2.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.2-6.0
  • WordPress version: 6.3.1
  • First release: Aug 4, 2022
  • Latest release: Aug 4, 2022
  • Number of updates: 6
  • Update frequency: every 1.2 days
  • Top authors: techforceglobal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /556 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

Server metrics [RAM: ▲0.09MB] [CPU: ▼5.63ms] Passed 4 tests

An overview of server-side resources used by Singlepage Website
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0839.95 ▼4.91
Dashboard /wp-admin3.40 ▲0.0951.89 ▼6.36
Posts /wp-admin/edit.php3.51 ▲0.1550.63 ▼0.60
Add New Post /wp-admin/post-new.php6.00 ▲0.1199.90 ▼10.63
Media Library /wp-admin/upload.php3.32 ▲0.0937.27 ▲1.47
Singlepage Setting /wp-admin/admin.php?page=singlepage-setting3.2636.35
Singlepage /wp-admin/admin.php?page=singlepagewebsite3.3943.99

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 41 new files
Database: 1 new table, 8 new options
New tables
wp_onepagedata
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
ps_settings
widget_theysaidso_widget
logo
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Singlepage Website
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲9814.87 ▲0.503.54 ▲1.5346.92 ▲2.76
Dashboard /wp-admin2,228 ▲405.86 ▲1.00105.21 ▼2.8679.70 ▲35.89
Posts /wp-admin/edit.php2,123 ▲372.07 ▲0.0337.91 ▲3.3130.90 ▼3.66
Add New Post /wp-admin/post-new.php1,697 ▲15922.33 ▼0.90704.89 ▲43.2546.38 ▼14.27
Media Library /wp-admin/upload.php1,491 ▲1034.19 ▼0.1099.26 ▼12.1978.76 ▲30.96
Singlepage Setting /wp-admin/admin.php?page=singlepage-setting9741.7228.1727.19
Singlepage /wp-admin/admin.php?page=singlepagewebsite3,09711.61249.00183.10

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_onepagedata
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • ps_settings
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • logo

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=singlepage-setting
    • > Notice in wp-content/plugins/singlepage/singlepagewebsite.php+311
    Undefined index: additionalcss_url

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_editor() in wp-content/plugins/singlepage/singledata/singlepagedata.php:75
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_head() in wp-content/plugins/singlepage/templates/singlepagetemplate.php:9

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=singlepagewebsite
    • > Network (severe)
    wp-admin/; - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Donate link: Invalid url: "none"
The official readme.txt might help

singlepage/singlepagewebsite.php 69% from 13 tests

The entry point to "Singlepage Website" version 1.0.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("singlepage.php" instead of "singlepagewebsite.php")
  • Description: The description should be shorter than 140 characters (currently 143 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin14,452 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
CSS84,6333610,794
SVG3002,692
PHP34641673
JavaScript46633293

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
9 PNG files occupy 0.77MB with 0.43MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/screenshot/Singlepage-main.png94.12KB22.55KB▼ 76.04%
assets/img/hero/play.png1.92KB0.93KB▼ 51.43%
assets/img/logo.png1.72KB0.74KB▼ 56.94%
assets/img/user.png4.69KB2.67KB▼ 42.99%
assets/img/category/shape.png157.01KB69.25KB▼ 55.90%