84% two-factor-sms

Code Review | Two Factor SMS

WordPress plugin Two Factor SMS scored 84% from 54 tests.

About plugin

  • Plugin page: two-factor-sms
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.3
  • WordPress version: 6.3.1
  • First release: Aug 27, 2015
  • Latest release: Aug 27, 2015
  • Number of updates: 12
  • Update frequency: N/A
  • Top authors: extendwings (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 3,657 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.01ms] Passed 4 tests

Server-side resources used by Two Factor SMS
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.52 ▼5.30
Dashboard /wp-admin3.31 ▲0.0144.54 ▼3.46
Posts /wp-admin/edit.php3.36 ▲0.0048.82 ▲1.73
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.90 ▼13.21
Media Library /wp-admin/upload.php3.23 ▲0.0034.20 ▼2.05

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 139 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Two Factor SMS: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.16 ▼1.224.91 ▲3.0544.26 ▲3.44
Dashboard /wp-admin2,206 ▲184.84 ▼0.05103.71 ▼1.2841.03 ▼0.10
Posts /wp-admin/edit.php2,089 ▲32.01 ▼0.0134.81 ▼1.1531.00 ▼3.21
Add New Post /wp-admin/post-new.php1,514 ▼2117.84 ▼5.31667.39 ▼12.2263.32 ▲5.30
Media Library /wp-admin/upload.php1,391 ▼04.25 ▲0.0498.58 ▼2.8242.70 ▼1.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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 118× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_TaskRouterListResource' not found in wp-content/plugins/two-factor-sms/includes/Twilio/Services/Twilio/Rest/TaskRouter/Reservations.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_ListResource' not found in wp-content/plugins/two-factor-sms/includes/Twilio/Services/Twilio/Rest/OutgoingCallerIds.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_ListResource' not found in wp-content/plugins/two-factor-sms/includes/Twilio/Services/Twilio/Rest/AuthorizedConnectApps.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_TaskRouterInstanceResource' not found in wp-content/plugins/two-factor-sms/includes/Twilio/Services/Twilio/Rest/TaskRouter/WorkspaceStatistics.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_InstanceResource' not found in wp-content/plugins/two-factor-sms/includes/Twilio/Services/Twilio/Rest/Address.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_ListResource' not found in wp-content/plugins/two-factor-sms/includes/Twilio/Services/Twilio/Rest/Media.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_ListResource' not found in wp-content/plugins/two-factor-sms/includes/Twilio/Services/Twilio/Rest/ConnectApps.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_TaskRouterListResource' not found in wp-content/plugins/two-factor-sms/includes/Twilio/Services/Twilio/Rest/TaskRouter/Workspaces.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_PricingInstanceResource' not found in wp-content/plugins/two-factor-sms/includes/Twilio/Services/Twilio/Rest/Pricing/VoiceCountry.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_NextGenInstanceResource' not found in wp-content/plugins/two-factor-sms/includes/Twilio/Services/Twilio/MonitorInstanceResource.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: security, mobile, two-factor, twilio, sms...

two-factor-sms/two-factor-sms.php Passed 13 tests

The main PHP script in "Two Factor SMS" version 0.1.1 is automatically included on every request by WordPress
51 characters long description:
Add SMS support to "Two Factor" feature as a plugin

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
No dangerous file extensions were detected2,655 lines of code in 135 files:
LanguageFilesBlank linesComment linesLines of code
PHP1335561,9822,555
PO File1182053
Markdown118047

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity2.25
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity1.76
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes156
▷ Abstract classes148.97%
▷ Concrete classes14291.03%
▷ Final classes00.00%
Methods256
▷ Static methods197.42%
▷ Public methods21684.38%
▷ Protected methods3614.06%
▷ Private methods41.56%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants114.29%
▷ Class constants685.71%
▷ Public constants6100.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
PNG images were not found in this plugin