84% simplepage-sync-landing-page-for-web

Code Review | SimplePage – Sync Landing Page For Web

WordPress plugin SimplePage – Sync Landing Page For Web scored84%from 54 tests.

About plugin

  • Plugin page: simplepage-sync-l...
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.8.2
  • WordPress version: 6.3.1
  • First release: Feb 23, 2021
  • Latest release: Nov 11, 2021
  • Number of updates: 7
  • Update frequency: every 37.3 days
  • Top authors: truongthanh6365 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /3,282 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼6.96ms] Passed 4 tests

A check of server-side resources used by SimplePage – Sync Landing Page For Web
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.19 ▼3.42
Dashboard /wp-admin3.35 ▲0.0545.65 ▼3.49
Posts /wp-admin/edit.php3.41 ▲0.0551.80 ▲4.80
Add New Post /wp-admin/post-new.php5.96 ▲0.0781.23 ▼20.71
Media Library /wp-admin/upload.php3.28 ▲0.0532.82 ▼0.22

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for SimplePage – Sync Landing Page For Web
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7313.19 ▼1.034.63 ▲2.5243.81 ▲0.49
Dashboard /wp-admin2,219 ▲285.84 ▼0.07108.49 ▲7.6938.00 ▼6.76
Posts /wp-admin/edit.php2,108 ▲192.09 ▲0.0538.48 ▲2.6335.98 ▼1.25
Add New Post /wp-admin/post-new.php1,531 ▼217.63 ▼5.49661.89 ▲50.1551.86 ▼7.60
Media Library /wp-admin/upload.php1,410 ▲194.31 ▲0.0997.94 ▲1.3542.29 ▲0.85

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/simplepage-sync-landing-page-for-web/admin/settings-page.php:2

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 on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
2 plugin tags: landing page, landingpage

simplepage-sync-landing-page-for-web/simplepage-sync-landing-page-for-web.php 92% from 13 tests

The main PHP script in "SimplePage – Sync Landing Page For Web" version 1.2.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected528 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP34331409
JavaScript12059
PO File1182156
CSS1004

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity26.00
▷ Minimum class complexity26.00
▷ Maximum class complexity26.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/remove.png1.06KB0.64KB▼ 39.61%