78% pontopass

Code Review | Pontopass

WordPress plugin Pontopass scored78%from 54 tests.

About plugin

  • Plugin page: pontopass
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.6
  • WordPress version: 6.3.1
  • First release: Jul 25, 2013
  • Latest release: Nov 4, 2013
  • Number of updates: 7
  • Update frequency: every 14.6 days
  • Top authors: gabriellima (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /947 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.12MB] [CPU: ▼6.57ms] Passed 4 tests

Server-side resources used by Pontopass
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1138.25 ▲1.17
Dashboard /wp-admin3.42 ▲0.1247.87 ▼0.17
Posts /wp-admin/edit.php3.54 ▲0.1843.89 ▼4.51
Add New Post /wp-admin/post-new.php6.00 ▲0.1280.11 ▼19.82
Media Library /wp-admin/upload.php3.34 ▲0.1232.41 ▼1.79
Pontopass /wp-admin/options-general.php?page=pontopass3.2931.84

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Pontopass
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6213.14 ▼1.311.68 ▲0.0941.99 ▲1.16
Dashboard /wp-admin2,212 ▲204.83 ▼0.14111.02 ▲7.6141.69 ▼0.84
Posts /wp-admin/edit.php2,098 ▲92.02 ▲0.0334.53 ▼3.1730.91 ▼1.87
Add New Post /wp-admin/post-new.php1,519 ▼1417.65 ▼5.68686.49 ▲36.3555.23 ▼1.01
Media Library /wp-admin/upload.php1,394 ▲34.20 ▲0.0394.19 ▼2.3840.36 ▼3.86
Pontopass /wp-admin/options-general.php?page=pontopass9532.0622.1727.82

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
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • pontopass_status

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=pontopass
    • > Notice in wp-content/plugins/pontopass/pontopass.php+385
    Undefined variable: warndevices
    • > GET request to /wp-admin/options-general.php?page=pontopass
    • > Notice in wp-content/plugins/pontopass/pontopass.php+424
    Undefined variable: validkey

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
The following issues need your attention
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      include(): Failed opening 'ABSPATH/wp-includes/class-phpass.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/pontopass/pontopass.php on line 17
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/pontopass/pontopass.php on line 17
    • > PHP Warning
      include(ABSPATH/wp-includes/class-phpass.php): failed to open stream: No such file or directory in wp-content/plugins/pontopass/pontopass.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pontopass/pontopass.php:451

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: two-factor authentication, autenticacao de dois fatores, 2fa, security, duplo fator...

pontopass/pontopass.php 92% from 13 tests

This is the main PHP file of "Pontopass" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 281 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin480 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2271213470
JavaScript13010

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity15.50
▷ Minimum class complexity8.00
▷ Maximum class complexity23.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods1694.12%
▷ Protected methods15.88%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
img/logo_pontopass.png2.52KB2.19KB▼ 13.11%