83% post-country

Code Review | Post Country

WordPress plugin Post Country scored83%from 54 tests.

About plugin

  • Plugin page: post-country
  • Plugin version: 2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-3.6.1
  • WordPress version: 6.3.1
  • First release: Apr 23, 2008
  • Latest release: Oct 21, 2013
  • Number of updates: 30
  • Update frequency: every 66.9 days
  • Top authors: peterwsterling (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /6,088 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
Installer ran successfully

Server metrics [RAM: ▼0.62MB] [CPU: ▼20.54ms] Passed 4 tests

Analyzing server-side resources used by Post Country
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0737.41 ▼8.05
Dashboard /wp-admin3.37 ▲0.0650.12 ▼2.03
Posts /wp-admin/edit.php3.49 ▲0.1349.99 ▼1.77
Add New Post /wp-admin/post-new.php3.22 ▼2.6735.75 ▼70.30
Media Library /wp-admin/upload.php3.29 ▲0.0637.74 ▲0.23

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Post Country
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲4214.24 ▼0.152.07 ▲0.2340.97 ▼2.14
Dashboard /wp-admin2,209 ▲295.56 ▼0.0390.22 ▼3.8068.83 ▲25.42
Posts /wp-admin/edit.php2,123 ▲231.98 ▼0.0633.64 ▼4.3133.33 ▼1.57
Add New Post /wp-admin/post-new.php6,578 ▲5,05226.22 ▲3.181,016.40 ▲353.8164.12 ▲11.28
Media Library /wp-admin/upload.php1,414 ▲204.22 ▲0.04100.72 ▲0.7366.03 ▲19.93

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/post-country/country.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Add images for these screenshots: #1 (An example posts page showing the new post attribute; the country it writes about.), #2 (An example of the mapping interface available in the enhanced mapping version.), #3 (An example of the GPX file mapping available in the enhanced mapping version.), #4 (An example of an elevation graph from a GPX trace available in the enhanced mapping version.)
Please take inspiration from this readme.txt

post-country/country.php 92% from 13 tests

The main PHP file in "Post Country" ver. 2.4 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("post-country.php" instead of "country.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin273 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP18345273

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
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%
Functions26
▷ Named functions26100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/world.png1.12KB1.05KB▼ 6.71%
images/world32.png3.49KB1.77KB▼ 49.44%