84% ifelsend-go-top

Code Review | IfElseNd Go Top

WordPress plugin IfElseNd Go Top scored84%from 54 tests.

About plugin

  • Plugin page: ifelsend-go-top
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-4.7
  • WordPress version: 6.3.1
  • First release: Dec 14, 2016
  • Latest release: Dec 20, 2016
  • Number of updates: 9
  • Update frequency: every 5.8 days
  • Top authors: naodai (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /900 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

A check of server-side resources used by IfElseNd Go Top
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.99 ▼4.07
Dashboard /wp-admin3.31 ▲0.0149.04 ▼2.86
Posts /wp-admin/edit.php3.36 ▲0.0146.96 ▲0.81
Add New Post /wp-admin/post-new.php5.89 ▲0.0191.66 ▲2.20
Media Library /wp-admin/upload.php3.23 ▲0.0136.85 ▲2.00

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by IfElseNd Go Top
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲9313.25 ▼1.042.22 ▲0.5139.66 ▼8.53
Dashboard /wp-admin2,206 ▲184.85 ▼1.00108.12 ▼1.5839.67 ▼3.42
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0338.66 ▲3.4134.87 ▼1.73
Add New Post /wp-admin/post-new.php1,533 ▲1123.25 ▼0.01657.22 ▼9.1868.90 ▲16.09
Media Library /wp-admin/upload.php1,388 ▲34.19 ▼0.02102.33 ▲6.5743.35 ▼1.04

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ifelsend-go-top/ifelsend_gotop.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
You can take inspiration from this readme.txt

ifelsend-go-top/ifelsend_gotop.php 92% from 13 tests

The entry point to "IfElseNd Go Top" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("ifelsend-go-top.php" instead of "ifelsend_gotop.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin112 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11222112

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
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
back-tip.png1.16KB0.32KB▼ 72.29%
btt.png0.56KB0.45KB▼ 20.28%