62% page-transitions

Code Review | WordPress Page Transitions

WordPress plugin WordPress Page Transitions scored62%from 54 tests.

About plugin

  • Plugin page: page-transitions
  • Plugin version: 1.4.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.4.1
  • WordPress version: 6.3.1
  • First release: Jul 3, 2012
  • Latest release: Feb 11, 2013
  • Number of updates: 29
  • Update frequency: every 7.7 days
  • Top authors: wordpresstuning (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /8,173 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.19MB] [CPU: ▼21.05ms] Passed 4 tests

This is a short check of server-side resources used by WordPress Page Transitions
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.95 ▼0.5018.75 ▼22.46
Dashboard /wp-admin3.32 ▲0.0233.67 ▼18.28
Posts /wp-admin/edit.php3.39 ▲0.0336.09 ▼12.48
Add New Post /wp-admin/post-new.php5.56 ▼0.3271.74 ▼30.96
Media Library /wp-admin/upload.php3.33 ▲0.1029.87 ▼5.41
Software /wp-admin/admin.php?page=wpt_software_page3.3233.49
Notifications /wp-admin/admin.php?page=wpt_queue_page3.3030.98
Transition files /wp-admin/admin.php?page=wpt_trans_files_page3.3328.57
Settings /wp-admin/admin.php?page=wpt_settings_page3.3028.74

Server storage [IO: ▲1.70MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
It is recommended to fix the following issues
  • You have illegally modified 3 files (3.21KB) outside of "wp-content/plugins/page-transitions/" and "wp-content/uploads/"
    • (new file) wp-content/themes/twentytwentyone/wpt-wrapper.php
    • (new file) wp-content/themes/twentytwentyone/wpt-generic.js
    • (new file) wp-content/ah_assets/.empty
Filesystem: 46 new files
Database: no new tables, 11 new options
New WordPress options
wpt_used_transitions
wpt_page_h
wpt_page_w
can_compress_scripts
theysaidso_admin_options
wpt_pass
wpt_quality
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
...

Browser metrics Passed 4 tests

An overview of browser requirements for WordPress Page Transitions
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,351 ▲61614.69 ▲0.4117.26 ▲15.4343.36 ▲5.58
Dashboard /wp-admin2,242 ▲545.88 ▲0.97101.98 ▼12.6341.84 ▼2.49
Posts /wp-admin/edit.php2,128 ▲392.01 ▲0.0236.56 ▼4.5733.61 ▼1.88
Add New Post /wp-admin/post-new.php1,559 ▲3323.05 ▼0.62659.93 ▲34.7154.58 ▲1.46
Media Library /wp-admin/upload.php1,424 ▲364.22 ▲0.0195.94 ▲0.6742.56 ▲0.25
Software /wp-admin/admin.php?page=wpt_software_page8402.0227.0925.35
Notifications /wp-admin/admin.php?page=wpt_queue_page7902.0624.2226.81
Transition files /wp-admin/admin.php?page=wpt_trans_files_page1,0992.0725.1034.76
Settings /wp-admin/admin.php?page=wpt_settings_page1,1821.8336.2131.29

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 11 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • wpt_used_transitions
    • can_compress_scripts
    • wpt_page_w
    • widget_recent-posts
    • wpt_pass
    • wpt_page_h
    • widget_recent-comments
    • widget_theysaidso_widget
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=wpt_queue_page
    • > Notice in wp-content/plugins/page-transitions/main.php+285
    Undefined index: wpt_ignore
    • > GET request to /wp-admin/admin.php?page=wpt_trans_files_page
    • > Notice in wp-content/plugins/page-transitions/templates/trans-files.php+34
    Undefined index: wpt_cat
    • > GET request to /wp-admin/admin.php?page=wpt_trans_files_page
    • > Notice in wp-content/plugins/page-transitions/templates/trans-files.php+62
    Undefined index: wpt_tag
    • > GET request to /wp-admin/admin.php?page=wpt_trans_files_page
    • > Notice in wp-content/plugins/page-transitions/templates/trans-files.php+107
    Undefined index: wpt_author
    • > GET request to /wp-admin/admin.php?page=wpt_settings_page
    • > Notice in wp-content/plugins/page-transitions/main.php+152
    Undefined index: save_transitions
    • > GET request to /wp-admin/admin.php?page=wpt_settings_page
    • > Notice in wp-content/plugins/page-transitions/main.php+158
    Undefined index: wpt_transitions_off
    • > GET request to /wp-admin/admin.php?page=wpt_settings_page
    • > Notice in wp-content/plugins/page-transitions/main.php+163
    Undefined index: wpt_transitions_on
    • > GET request to /wp-admin/admin.php?page=wpt_settings_page
    • > Notice in wp-content/plugins/page-transitions/main.php+168
    Undefined index: save_settings
    • > GET request to /wp-admin/admin.php?page=wpt_settings_page
    • > Notice in wp-content/plugins/page-transitions/main.php+175
    Undefined index: new_pass
    • > GET request to /wp-admin/admin.php?page=wpt_settings_page
    • > Notice in wp-content/plugins/page-transitions/main.php+180
    Undefined index: wpt_save_styles
    • > GET request to /wp-admin/admin.php?page=wpt_settings_page
    • > Notice in wp-content/plugins/page-transitions/templates/settings.php+147
    Undefined variable: success

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/page-transitions/templates/software.php
  • 21× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant WPT_PLUGIN_URL - assumed 'WPT_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/page-transitions/templates/software.php on line 13
    • > PHP Warning
      Use of undefined constant WPT_PLUGIN_URL - assumed 'WPT_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/page-transitions/templates/settings.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_dropdown_categories() in wp-content/plugins/page-transitions/templates/trans-files.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/page-transitions/_config.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/page-transitions/modules/screenshot.php:3
    • > PHP Warning
      include_once(): Failed opening 'WPT_PLUGIN_PATH/classes/SimpleXMLExtended.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/page-transitions/modules/api.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/page-transitions/templates/queue.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/page-transitions/_config.php:3
    • > PHP Warning
      Use of undefined constant WPT_PLUGIN_URL - assumed 'WPT_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/page-transitions/templates/software.php on line 9
    • > PHP Warning
      Use of undefined constant WPT_PLUGIN_URL - assumed 'WPT_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/page-transitions/templates/trans-files.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 ('Scanner' Page Transition), #2 ('Genie' Page Transition), #3 ('Bad Signal' Page Transition), #4 ('Butterflies' Page Transition), #5 ('Old TV' Page Transition), #6 ('Flip' Page Transition), #7 ('Dispersion' Page Transition), #8 ('Transformers' Page Transition)
The official readme.txt might help

page-transitions/main.php 92% from 13 tests

This is the main PHP file of "WordPress Page Transitions" version 1.4.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("page-transitions.php" instead of "main.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
It is important to fix the following items
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .air - Adobe AIR Installation Package in Adobe AIR
      • wp-content/plugins/page-transitions/software/WP-Page-Transition-Generator.air
1,374 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP102081591,038
JavaScript734130262
CSS213374

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.41
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions43
▷ Named functions43100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
templates/images/slider.png0.53KB0.54KB0.00%