79% find-your-reps

Code Review | Find Your Reps

WordPress plugin Find Your Reps scored79%from 54 tests.

About plugin

  • Plugin page: find-your-reps
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.2-4.5
  • WordPress version: 6.3.1
  • First release: Jan 25, 2014
  • Latest release: Mar 31, 2016
  • Number of updates: 13
  • Update frequency: every 61.2 days
  • Top authors: homergz (92.31%)kathleenfmalone (15.38%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,702 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.01MB] [CPU: ▼1.55ms] Passed 4 tests

Server-side resources used by Find Your Reps
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.09 ▲1.01
Dashboard /wp-admin3.32 ▲0.0244.57 ▼1.15
Posts /wp-admin/edit.php3.37 ▲0.0148.72 ▼5.20
Add New Post /wp-admin/post-new.php5.91 ▲0.01109.96 ▲10.08
Media Library /wp-admin/upload.php3.25 ▲0.0133.14 ▼0.84
Find Your Reps /wp-admin/options-general.php?page=fyr_slug3.1929.71

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Find Your Reps
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.21 ▼1.161.73 ▲0.1138.60 ▼5.88
Dashboard /wp-admin2,210 ▲284.86 ▼0.99109.09 ▲2.7840.69 ▼2.94
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0539.40 ▲3.7034.49 ▲0.72
Add New Post /wp-admin/post-new.php1,538 ▲523.25 ▲0.15636.17 ▼30.4864.80 ▲7.55
Media Library /wp-admin/upload.php1,389 ▲14.21 ▼0.0095.14 ▼10.5845.01 ▲0.44
Find Your Reps /wp-admin/options-general.php?page=fyr_slug8122.0328.3226.26

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • 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
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=fyr_slug
    • > Notice in wp-content/plugins/find-your-reps/includes/admin.php+43
    Trying to access array offset on value of type bool

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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/find-your-reps/find-your-reps.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/find-your-reps/includes/admin.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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
9 plugin tags: state legislature, legislator, find state legislators, find state representatives, representative...

find-your-reps/find-your-reps.php Passed 13 tests

This is the main PHP file of "Find Your Reps" version 1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
80 characters long description:
This plugin finds your state representatives by street address and returns their

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected240 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP24919137
JavaScript129285
CSS10318

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions7
▷ Named functions7100.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