94% british-member-of-parliament-profile

Code Review | British Member of Parliament Profile

WordPress plugin British Member of Parliament Profile scored 94% from 54 tests.

About plugin

  • Plugin page: british-member-of...
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.5
  • WordPress version: 5.8.1
  • First release: Apr 20, 2020
  • Latest release: Sep 1, 2020
  • Number of updates: 4
  • Update frequency: every 33.5 days
  • Top authors: torres126 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 331 total downloads

Benchmarks

Plugin footprint Passed 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼142.06ms] Passed 4 tests

An overview of server-side resources used by British Member of Parliament Profile
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.0236.24 ▼2.79
Dashboard /wp-admin3.07 ▲0.0237.26 ▼6.97
Posts /wp-admin/edit.php3.13 ▲0.0243.15 ▲4.03
Add New Post /wp-admin/post-new.php5.43 ▼0.0090.85 ▼562.52
Media Library /wp-admin/upload.php3.02 ▲0.0136.86 ▲9.91

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for British Member of Parliament Profile
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,681 ▲8515.83 ▲0.239.95 ▲1.6348.96 ▼6.22
Dashboard /wp-admin2,973 ▲425.93 ▲0.02146.53 ▼12.28114.95 ▼3.06
Posts /wp-admin/edit.php2,739 ▼02.70 ▲0.0166.69 ▼9.7992.65 ▼6.88
Add New Post /wp-admin/post-new.php1,670 ▲17019.15 ▲0.40377.97 ▼30.42111.77 ▲2.58
Media Library /wp-admin/upload.php1,807 ▼05.03 ▲0.02150.73 ▼9.11123.94 ▲1.41

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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 take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/british-member-of-parliament-profile/british-member-of-parliament-profile.php:91

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)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
10 plugin tags: petitions, campaigns, house of commons, united kingdom, parliament...

british-member-of-parliament-profile/british-member-of-parliament-profile.php 92% from 13 tests

The principal PHP file in "British Member of Parliament Profile" v. 1.1.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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 detected327 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1110135
CSS1291125
PHP1131767

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
PNG images were not found in this plugin