67% mobile-wp-security

Code Review | Mobile WP Security

WordPress plugin Mobile WP Security scored67%from 54 tests.

About plugin

  • Plugin page: mobile-wp-security
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.2.1
  • WordPress version: 6.3.1
  • First release: Jun 29, 2020
  • Latest release: Jun 30, 2020
  • Number of updates: 5
  • Update frequency: every 0.8 days
  • Top authors: dacalleg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /429 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.04MB] [CPU: ▼13.96ms] Passed 4 tests

This is a short check of server-side resources used by Mobile WP Security
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.86 ▲0.4042.38 ▼1.80
Dashboard /wp-admin3.68 ▲0.3353.99 ▼9.80
Posts /wp-admin/edit.php3.73 ▲0.3754.28 ▲1.40
Add New Post /wp-admin/post-new.php4.72 ▼1.1754.39 ▼45.63
Media Library /wp-admin/upload.php3.54 ▲0.3144.87 ▲7.38
Mobile Security /wp-admin/options-general.php?page=mobile_wp_security3.4937.04

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 818 new files
Database: 3 new tables, 9 new options
New tables
wp_mobile_security_devices
wp_mobile_security_ip_log
wp_mobile_security_ban_rules
New WordPress options
can_compress_scripts
mobile_wp_security_secret_key
widget_theysaidso_widget
db_upgraded
mobile_wp_security_settings
mobile_wp_security_db_version
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Mobile WP Security: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4314.25 ▼0.341.63 ▼0.1544.66 ▲1.09
Dashboard /wp-admin2,199 ▲255.64 ▲0.0891.50 ▼13.5543.54 ▼5.11
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0539.62 ▲0.0838.88 ▲3.12
Add New Post /wp-admin/post-new.php1,529 ▼923.30 ▼0.02685.51 ▼19.5549.37 ▼16.97
Media Library /wp-admin/upload.php1,401 ▼24.19 ▼0.0499.58 ▼6.8942.79 ▼2.25
Mobile Security /wp-admin/options-general.php?page=mobile_wp_security7841.9825.7027.15

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie tables were found after uninstall: 3 tables
    • wp_mobile_security_ip_log
    • wp_mobile_security_ban_rules
    • wp_mobile_security_devices
  • This plugin does not fully uninstall, leaving 9 options in the database
    • db_upgraded
    • mobile_wp_security_db_version
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • mobile_wp_security_secret_key
    • widget_theysaidso_widget
    • can_compress_scripts
    • mobile_wp_security_settings

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/mobile-wp-security/vendor/jms/parser-lib/tests/bootstrap.php
    • > /wp-content/plugins/mobile-wp-security/vendor/jms/serializer/tests/benchmark.php
    • > /wp-content/plugins/mobile-wp-security/vendor/phpcollection/phpcollection/tests/bootstrap.php
  • 239× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'JMS\\Serializer\\Handler\\SubscribingHandlerInterface' not found in wp-content/plugins/mobile-wp-security/vendor/jms/serializer/src/JMS/Serializer/Handler/PhpCollectionHandler.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'JMS\\Serializer\\Metadata\\ClassMetadata' not found in wp-content/plugins/mobile-wp-security/vendor/jms/serializer/tests/Metadata/Driver/php/Discriminator.Car.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Metadata\\Tests\\Fixtures\\TestObject' not found in wp-content/plugins/mobile-wp-security/vendor/jms/metadata/tests/Metadata/Tests/Fixtures/TestParent.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOption\\Option' not found in wp-content/plugins/mobile-wp-security/vendor/phpoption/phpoption/src/PhpOption/None.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'JMS\\Serializer\\Annotation\\XmlCollection' not found in wp-content/plugins/mobile-wp-security/vendor/jms/serializer/src/JMS/Serializer/Annotation/XmlMap.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'JMS\\Serializer\\VisitorInterface' not found in wp-content/plugins/mobile-wp-security/vendor/jms/serializer/src/JMS/Serializer/AbstractVisitor.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'JMS\\Serializer\\Exclusion\\ExclusionStrategyInterface' not found in wp-content/plugins/mobile-wp-security/vendor/jms/serializer/src/JMS/Serializer/Exclusion/GroupsExclusionStrategy.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'JMS\\Serializer\\Handler\\SubscribingHandlerInterface' not found in wp-content/plugins/mobile-wp-security/vendor/jms/serializer/src/JMS/Serializer/Handler/StdClassHandler.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Metadata\\Tests\\Fixtures\\ComplexHierarchy\\BaseClass' not found in wp-content/plugins/mobile-wp-security/vendor/jms/metadata/tests/Metadata/Tests/Fixtures/ComplexHierarchy/SubClassB.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/mobile-wp-security/vendor/jms/serializer/tests/Handler/ArrayCollectionHandlerTest.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (Plugin Settings and Qr-Code) image missing
The official readme.txt is a good inspiration

mobile-wp-security/mobile-wp-security.php 77% from 13 tests

This is the main PHP file of "Mobile WP Security" version 1.2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 152 characters long)
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected27,309 lines of code in 780 files:
LanguageFilesBlank linesComment linesLines of code
PHP4785,9968,05822,538
XML1401221,194
reStructuredText205359341,014
Markdown163560965
JSON1210827
YAML113360757
Bourne Shell10014

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity5.04
▷ Minimum class complexity1.00
▷ Maximum class complexity144.00
Average method complexity2.01
▷ Minimum method complexity1.00
▷ Maximum method complexity84.00
Code structure
Namespaces74
Interfaces40
Traits3
Classes417
▷ Abstract classes296.95%
▷ Concrete classes38893.05%
▷ Final classes5213.40%
Methods1,975
▷ Static methods673.39%
▷ Public methods1,71386.73%
▷ Protected methods1216.13%
▷ Private methods1417.14%
Functions123
▷ Named functions75.69%
▷ Anonymous functions11694.31%
Constants138
▷ Global constants00.00%
▷ Class constants138100.00%
▷ Public constants138100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin