84% sacoronavirus-link

Code Review | Coronavirus Link for South Africa .co.za Websites

WordPress plugin Coronavirus Link for South Africa .co.za Websites scored84%from 54 tests.

About plugin

  • Plugin page: sacoronavirus-link
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.4
  • WordPress version: 6.3.1
  • First release: Apr 7, 2020
  • Latest release: Apr 14, 2020
  • Number of updates: 14
  • Update frequency: every 0.6 days
  • Top authors: craigmj (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

50+ active /785 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼2.22ms] Passed 4 tests

Analyzing server-side resources used by Coronavirus Link for South Africa .co.za Websites
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0433.89 ▼3.51
Dashboard /wp-admin3.36 ▲0.0544.85 ▲1.20
Posts /wp-admin/edit.php3.41 ▲0.0545.20 ▼6.40
Add New Post /wp-admin/post-new.php5.94 ▲0.0594.63 ▲6.81
Media Library /wp-admin/upload.php3.28 ▲0.0535.72 ▼0.16

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Coronavirus Link for South Africa .co.za Websites
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲14513.22 ▼1.426.06 ▲4.3943.69 ▲0.21
Dashboard /wp-admin2,242 ▲515.87 ▼0.01107.30 ▲7.3139.19 ▼3.64
Posts /wp-admin/edit.php2,125 ▲332.03 ▲0.0336.45 ▼4.2832.63 ▼3.98
Add New Post /wp-admin/post-new.php1,546 ▲3223.03 ▲5.49579.31 ▼105.5251.72 ▼3.44
Media Library /wp-admin/upload.php1,421 ▲334.20 ▼0.0594.50 ▼9.4438.21 ▼9.10

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 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/sacoronavirus-link/sacoronavirus-link.php:22

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

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: coronavirus, sacoronavirus, covid-19

sacoronavirus-link/sacoronavirus-link.php Passed 13 tests

The main file in "Coronavirus Link for South Africa .co.za Websites" v. 1.0.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
91 characters long description:
Implements a link to the the official South Africa government COVID-19 portal on your site.

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
Everything looks great! No dangerous files found in this plugin270 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP1269249
Markdown113019
JavaScript1001
SVG1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions12
▷ Named functions12100.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 are no PNG files in this plugin