68% themepaste-secure-admin

Code Review | Themepaste Secure Admin

WordPress plugin Themepaste Secure Admin scored68%from 54 tests.

About plugin

  • Plugin page: themepaste-secure...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.7.2
  • WordPress version: 6.3.1
  • First release: Jul 26, 2017
  • Latest release: Jul 26, 2017
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: jewelmajumder (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /573 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼1.71MB] [CPU: ▼48.10ms] Passed 4 tests

An overview of server-side resources used by Themepaste Secure Admin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.1910.30 ▼28.24
Dashboard /wp-admin2.30 ▼1.0111.89 ▼39.53
Posts /wp-admin/edit.php2.30 ▼1.0611.46 ▼37.19
Add New Post /wp-admin/post-new.php2.30 ▼3.5913.22 ▼87.44
Media Library /wp-admin/upload.php2.30 ▼0.9313.80 ▼24.51
Themepaste Secure Admin /wp-admin/admin.php?page=wptpsa-page2.3012.94
Email Activation /wp-admin/admin.php?page=wptpsa-email-template2.3013.77
User Role Manager /wp-admin/admin.php?page=wptpsa-user-role-manager2.309.84
Login Attempts /wp-admin/admin.php?page=wptpsa-login-attempts2.3013.14
Settings /wp-admin/admin.php?page=wptpsa-settings2.3010.61
Custom Layout /wp-admin/admin.php?page=wptpsa-layout2.3013.64
Captcha Activation /wp-admin/admin.php?page=wptpsa-captcha2.3012.11

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 38 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
wptpsa_version
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Themepaste Secure Admin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,994 ▲23314.51 ▲0.321.64 ▼0.0338.43 ▼1.93
Dashboard /wp-admin2,398 ▲2216.15 ▲0.49131.24 ▲38.3439.70 ▼3.48
Posts /wp-admin/edit.php2,330 ▲2333.33 ▲1.3951.19 ▲15.8931.57 ▼4.80
Add New Post /wp-admin/post-new.php1,577 ▲4923.40 ▲0.38657.41 ▼23.1335.83 ▼31.23
Media Library /wp-admin/upload.php1,466 ▲694.06 ▼0.1393.92 ▼8.5049.44 ▲7.27
Themepaste Secure Admin /wp-admin/admin.php?page=wptpsa-page1,2943.4946.1564.73
Email Activation /wp-admin/admin.php?page=wptpsa-email-template1,1293.3948.8155.50
User Role Manager /wp-admin/admin.php?page=wptpsa-user-role-manager1,1263.5943.5961.19
Login Attempts /wp-admin/admin.php?page=wptpsa-login-attempts1,1293.4647.1760.91
Settings /wp-admin/admin.php?page=wptpsa-settings1,2243.4645.4848.25
Custom Layout /wp-admin/admin.php?page=wptpsa-layout1,4073.5545.9636.38
Captcha Activation /wp-admin/admin.php?page=wptpsa-captcha1,1293.5043.3869.36

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/themepaste-secure-admin/themepaste-install.php+5
    Undefined variable: wptpsa_version
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wptpsa-captcha
    • > Notice in wp-content/plugins/themepaste-secure-admin/themepaste-install.php+5
    Undefined variable: wptpsa_version
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wptpsa-captcha
    • > Notice in wp-content/plugins/themepaste-secure-admin/classes/WPTPSABase.php+63
    Undefined variable: _SESSION
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wptpsa-captcha
    • > Notice in wp-content/plugins/themepaste-secure-admin/classes/WPTPSABase.php+63
    Trying to access array offset on value of type null
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wptpsa-captcha
    • > Notice in wp-content/plugins/themepaste-secure-admin/classes/WPTPSABase.php+76
    Undefined variable: type
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wptpsa-captcha
    • > Notice in wp-content/plugins/themepaste-secure-admin/classes/WPTPSABase.php+76
    Undefined variable: message
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wptpsa-page
    • > Notice in wp-content/plugins/themepaste-secure-admin/themepaste-main-page.php+149
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/admin.php?page=wptpsa-layout
    • > Notice in wp-content/plugins/themepaste-secure-admin/themepaste-custom-layout.php+128
    Undefined index: custom_layout_status

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/themepaste-secure-admin/themepaste-menu.php:18
    • > PHP Warning
      Use of undefined constant WPTPSA_PACKAGE - assumed 'WPTPSA_PACKAGE' (this will throw an Error in a future version of PHP) in wp-content/plugins/themepaste-secure-admin/themepaste-pro-features.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/themepaste-secure-admin/templates/master_status.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/themepaste-secure-admin/themepaste-main-page.php:175
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/themepaste-secure-admin/themepaste-install.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/themepaste-secure-admin/themepaste-secure-admin.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/themepaste-secure-admin/themepaste-custom-layout.php:12

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 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes: You can take inspiration from this readme.txt

themepaste-secure-admin/themepaste-secure-admin.php 92% from 13 tests

The primary PHP file in "Themepaste Secure Admin" version 1.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Success! There were no dangerous files found in this plugin4,809 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
CSS415201,645
JavaScript43281761,548
PHP123031121,202
SVG100414

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity10.50
▷ Minimum class complexity10.00
▷ Maximum class complexity11.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods1164.71%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions74
▷ Named functions74100.00%
▷ Anonymous functions00.00%
Constants18
▷ Global constants18100.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
5 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/datatable/images/sort_asc.png0.16KB0.25KB0.00%
js/datatable/images/sort_both.png0.20KB0.29KB0.00%
js/datatable/images/sort_desc.png0.15KB0.25KB0.00%
images/display_type_2.png1.54KB1.61KB0.00%
images/display_type_1.png1.45KB1.59KB0.00%