84% find-a-site

Code Review | Find a Site

WordPress plugin Find a Site scored 84% from 54 tests.

About plugin

  • Plugin page: find-a-site
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.0+
  • WordPress version: 6.3.1
  • First release: May 22, 2015
  • Latest release: Mar 13, 2016
  • Number of updates: 8
  • Update frequency: every 37.3 days
  • Top authors: twhittaker (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 876 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.09ms] Passed 4 tests

An overview of server-side resources used by Find a Site
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0333.55 ▼5.66
Dashboard /wp-admin3.33 ▲0.0345.63 ▼3.38
Posts /wp-admin/edit.php3.38 ▲0.0247.76 ▲0.04
Add New Post /wp-admin/post-new.php5.91 ▲0.0283.36 ▼19.35
Media Library /wp-admin/upload.php3.25 ▲0.0236.02 ▲1.47

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Find a Site
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.18 ▼1.201.71 ▼0.0738.71 ▼2.63
Dashboard /wp-admin2,206 ▲155.90 ▲1.03111.89 ▲7.0241.30 ▼1.37
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0139.37 ▼0.4634.73 ▼3.03
Add New Post /wp-admin/post-new.php1,514 ▼2817.73 ▼0.43670.63 ▲59.9552.83 ▼5.39
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.0699.89 ▲1.5940.77 ▼3.01

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

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)
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 fix 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_action() in wp-content/plugins/find-a-site/find-multi-db-site.php:58

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Contributors: Plugin contributors field is missing
Please take inspiration from this readme.txt

find-a-site/find-multi-db-site.php 92% from 13 tests

"Find a Site" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("find-a-site.php" instead of "find-multi-db-site.php")

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 plugin79 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2154479

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin