90% world-population-counter

Code Review | World Population Counter

WordPress plugin World Population Counter scored90%from 54 tests.

About plugin

  • Plugin page: world-population-...
  • Plugin version: 1.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.4
  • WordPress version: 6.3.1
  • First release: Nov 16, 2016
  • Latest release: Nov 26, 2023
  • Number of updates: 15
  • Update frequency: every 170.7 days
  • Top authors: algoritmika (80%)wpcodefactory (26.67%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,418 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.15ms] Passed 4 tests

This is a short check of server-side resources used by World Population Counter
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0541.84 ▲4.20
Dashboard /wp-admin3.41 ▲0.1046.12 ▼4.84
Posts /wp-admin/edit.php3.52 ▲0.1647.50 ▲2.19
Add New Post /wp-admin/post-new.php5.99 ▲0.0985.31 ▼11.83
Media Library /wp-admin/upload.php3.33 ▲0.0934.25 ▼2.13
World Population Counter /wp-admin/options-general.php?page=world-population-counter3.3030.52

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_alg_widget_world_population_counter
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for World Population Counter
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,905 ▲11813.80 ▼0.368.54 ▲6.7744.83 ▲5.42
Dashboard /wp-admin2,199 ▲255.60 ▼0.0689.67 ▼9.3342.79 ▼1.07
Posts /wp-admin/edit.php2,104 ▲12.03 ▲0.0240.98 ▲4.7537.49 ▲0.35
Add New Post /wp-admin/post-new.php1,529 ▲323.11 ▼0.07677.43 ▲82.2551.55 ▼2.31
Media Library /wp-admin/upload.php1,404 ▲44.27 ▲0.0995.74 ▼2.5242.73 ▲2.15
World Population Counter /wp-admin/options-general.php?page=world-population-counter9272.0329.7228.12

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_alg_widget_world_population_counter
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 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)
Good news, no errors were detected

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: population, world, counter, clock

world-population-counter/world-population-counter.php Passed 13 tests

The main file in "World Population Counter" v. 1.4.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
48 characters long description:
Adds live world population counter to 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
Good job! No executable or dangerous file extensions detected390 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP596297337
JavaScript3102553

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity10.33
▷ Minimum class complexity4.00
▷ Maximum class complexity15.00
Average method complexity1.97
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods29
▷ Static methods13.45%
▷ Public methods29100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG files were detected