84% ab-simple-weather

Code Review | AB Simple Weather

WordPress plugin AB Simple Weather scored 84% from 54 tests.

About plugin

  • Plugin page: ab-simple-weather
  • Plugin version: 1.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.4
  • WordPress version: 5.8.1
  • First release: Jan 23, 2018
  • Latest release: Mar 24, 2018
  • Number of updates: 13
  • Update frequency: every 4.7 days
  • Top authors: abooze (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 2,534 total downloads


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
Install script ran successfully

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

Analyzing server-side resources used by AB Simple Weather
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.1644.45 ▲24.30
Dashboard /wp-admin3.11 ▲0.0546.03 ▲1.50
Posts /wp-admin/edit.php3.16 ▲0.0544.89 ▲2.10
Add New Post /wp-admin/post-new.php5.47 ▲0.0484.26 ▼568.81
Media Library /wp-admin/upload.php3.05 ▲0.0529.01 ▼1.52

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 1 new option
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for AB Simple Weather
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲11216.03 ▲0.4510.64 ▲0.7947.77 ▲2.34
Dashboard /wp-admin2,990 ▲635.85 ▼0.12135.66 ▼18.51104.82 ▼2.21
Posts /wp-admin/edit.php2,759 ▲202.71 ▼0.1162.42 ▼2.2599.94 ▲9.25
Add New Post /wp-admin/post-new.php1,685 ▲18518.81 ▲0.24360.90 ▲3.21111.79 ▲2.88
Media Library /wp-admin/upload.php1,830 ▲235.04 ▲0.04138.05 ▼25.71116.85 ▼1.71

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 1 option
    • absw_plugin_options

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/ab-simple-weather/ab-simple-weather.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
1 plugin tags: 12

ab-simple-weather/ab-simple-weather.php Passed 13 tests

The principal PHP file in "AB Simple Weather" v. 1.2 is loaded by WordPress automatically on each request
68 characters long description:
A simple but powerful plugin to show current weather in your website

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
No dangerous file extensions were detected524 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions20100.00%
▷ Anonymous functions00.00%
▷ 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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon.png2.27KB1.95KB▼ 14.23%