84% visit-site-from-customizer

Code Review | Visit Site from Customizer

WordPress plugin Visit Site from Customizer scored84%from 54 tests.

About plugin

  • Plugin page: visit-site-from-c...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.8.2
  • WordPress version: 6.3.1
  • First release: Oct 9, 2017
  • Latest release: Oct 9, 2017
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: rushijagani (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /548 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.00MB] [CPU: ▼7.65ms] Passed 4 tests

This is a short check of server-side resources used by Visit Site from Customizer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.09 ▼2.29
Dashboard /wp-admin3.31 ▼0.0349.78 ▼13.49
Posts /wp-admin/edit.php3.37 ▲0.0146.44 ▼0.72
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.39 ▼14.08
Media Library /wp-admin/upload.php3.24 ▲0.0135.31 ▼0.54

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Visit Site from Customizer: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.61 ▲0.061.65 ▼0.0241.26 ▲2.89
Dashboard /wp-admin2,195 ▲175.60 ▲0.0288.96 ▼20.8237.78 ▼9.60
Posts /wp-admin/edit.php2,100 ▼32.02 ▲0.0039.82 ▲2.8635.42 ▲0.19
Add New Post /wp-admin/post-new.php1,526 ▼023.12 ▼0.02646.74 ▼25.9258.38 ▲8.91
Media Library /wp-admin/upload.php1,400 ▼34.17 ▼0.04114.61 ▲9.4747.36 ▼2.09

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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 fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/visit-site-from-customizer/class-visit-site-customizer.php:14

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: customizer, visit site from customizer, any theme

visit-site-from-customizer/class-visit-site-customizer.php 85% from 13 tests

The main file in "Visit Site from Customizer" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("visit-site-from-customizer.php" instead of "class-visit-site-customizer.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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 plugin47 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1155931
JavaScript15916

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods125.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG files were detected