83% nice-page-transition

Code Review | Nice page transition

WordPress plugin Nice page transition scored83%from 54 tests.

About plugin

  • Plugin page: nice-page-transition
  • Plugin version: 1.03
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.3
  • WordPress version: 6.3.1
  • First release: Jun 6, 2017
  • Latest release: Jul 31, 2023
  • Number of updates: 21
  • Update frequency: every 107.0 days
  • Top authors: manu225 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /7,706 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.79ms] Passed 4 tests

Server-side resources used by Nice page transition
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.45 ▼5.18
Dashboard /wp-admin3.31 ▲0.0147.26 ▼0.75
Posts /wp-admin/edit.php3.36 ▲0.0148.01 ▼1.69
Add New Post /wp-admin/post-new.php5.89 ▲0.0198.88 ▼7.53
Media Library /wp-admin/upload.php3.23 ▲0.0132.65 ▲0.69
Nice page transition settings /wp-admin/options-general.php?page=nice_page_transition_settings3.2332.49

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
nice_page_transition_type
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Nice page transition: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,915 ▲18013.62 ▼0.676.16 ▲4.1344.41 ▼8.71
Dashboard /wp-admin2,210 ▲224.90 ▼1.00104.59 ▼2.6938.39 ▼4.54
Posts /wp-admin/edit.php2,093 ▲12.00 ▼0.0035.58 ▼4.2732.27 ▼3.60
Add New Post /wp-admin/post-new.php1,536 ▲123.23 ▲0.04645.26 ▼0.5251.99 ▼1.79
Media Library /wp-admin/upload.php1,395 ▲74.18 ▲0.0095.55 ▲0.1744.48 ▲2.45
Nice page transition settings /wp-admin/options-general.php?page=nice_page_transition_settings8432.0123.0824.68

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • 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× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/nice-page-transition/views/settings.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/nice-page-transition/nice-page-transition.php:17

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 errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (13 tag instead of maximum 10)
You can take inspiration from this readme.txt

nice-page-transition/nice-page-transition.php 85% from 13 tests

"Nice page transition" version 1.03's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Domain Path: The domain path must begin with a forward slash character ("/")
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("")

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
Everything looks great! No dangerous files found in this plugin137 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
CSS112073
PHP2201457
JavaScript1717

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/fb.png1.59KB1.00KB▼ 37.42%
images/save.png0.54KB0.39KB▼ 28.11%